only enter low power mode waitForEvent() in idle if there is no active PWM
This commit is contained in:
1 parent
2963e1dade
commit
a335699296
4 files changed
+11
-7
No files matched your search
+6
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user