Closed robertinant closed 7 years ago
From @rei-vilo on December 14, 2015 18:56
@measley
With EMT, by default, idle mode, i.e. no task running = sleep.
I could do a sleep macro that simply calls delay.
I could do a sleep macro that simply calls delay.
Calling delay()
would perform a yield.
Thinking about this more, I am not going to provide sleep for any EMT targets. MSP430 will remain the only one that will have sleep.
As an alternative, for a non-yielding sleep()
void nonYieldingSleep(uint32_t ms)
{
uint32_t chrono = millis() + ms;
while (millis() < chronology);
}
From @measley on October 12, 2015 1:41
Sleep() does not appear to be defined in EMT (MSP432, CC3200)
I replaced sleep() with delay in blink.ino and got following error.
Blink.ino:32:13: error: 'sleep' was not declared in this scope
I understand the delay already has low power modes enabled, do we need to enable sleep() API for legacy or additional modes?
Copied from original issue: energia/Energia#742