only enter low power mode waitForEvent() in idle if there is no active PWM

This commit is contained in:
hathach committed 2017-04-09 14:42:26 +07:00
1 parent 2963e1dade
commit a335699296
4 files changed
+11 -7

No files matched your search

+6 -1
View File
@@ -88,7 +88,12 @@ extern "C"
void vApplicationIdleHook( void )
{
waitForEvent();
// Enter low-power mode will turn of hardware PWM
// Only go there if no PWM device is active.
if ( !(PWM0.begun() || PWM1.begun() || PWM2.begun() ) )
{
waitForEvent();
}
}
}