![]() |
![]() |
Global configuration structure. More...
#include <PowerWFF3.h>
Data Fields | |
| Power_PolicyInitFxn | policyInitFxn |
| The Power Policy's initialization function. More... | |
| Power_PolicyFxn | policyFxn |
| The Power Policy function. More... | |
Global configuration structure.
| Power_PolicyInitFxn PowerWFF3_Config::policyInitFxn |
The Power Policy's initialization function.
If the policy does not have an initialization function, 'NULL' should be specified.
| Power_PolicyFxn PowerWFF3_Config::policyFxn |
The Power Policy function.
When enabled, this function is invoked in the idle loop, to opportunistically select and activate sleep states.
Two reference policies are provided:
PowerWFF3_doWFI() - a simple policy that invokes CPU wait for interrupt (WFI)
PowerWFF3_sleepPolicy() - an aggressive policy that considers constraints, time until next scheduled work, and SLEEP state latencies, and optionally puts the device into the SLEEP state, the IDLE state, or as a minimum, WFI.
Custom policies can be written, and specified via this function pointer.
In addition to this static selection, the Power Policy can be dynamically changed at runtime, via the Power_setPolicy() API.
If not NULL, the policy function will be invoked once for each pass of the idle loop.
The power policy can be dynamically enabled and disabled at runtime, via the Power_enablePolicy() and Power_disablePolicy() functions, respectively.