LOGGER
Logger
Data Logging using ESP8266
|
#include "basetype.h"
Go to the source code of this file.
Functions | |
void | sleepservicesInit () |
< version of this module More... | |
void | sleepservicesLoop () |
void | sleepservicesWakeup () |
Services to support sleeping.
The basic strategy is that every time through the main loop the system will try to sleep. Any ISR or process that needs to wake up the next time through the main loop must call sleepservicesWakeup. This will cause a wakeup if the system is sleeping and will allow a cycle through the main loop if not.
??? ANY ISR MUST WAKE THE PROCESSOR. I think this is supported by the way the hardware works, but, if not ISRs, even those not part of the directly implemented code must cause a wakeup.
void sleepservicesInit | ( | ) |
< version of this module
Initialize sleep services, call once at system startup.
void sleepservicesLoop | ( | ) |
Call this once at the top of the main loop. If all psudo tasks are idle the system will sleep prior to return. A call to sleepservicesWakeup will trigger a wakeup. If there is anything to do (known by someone calling sleepservicesWakeup since the last call to this routine) this routine will simply return.
void sleepservicesWakeup | ( | ) |
Call this routine from a psudo task to declare that the tast must get called again prior to sleeping. Also used to declare that some other psudo task must be run prior to sleeping. Once this call is made the scheduling system ensures a wakeup will occur and guarentees that all psudo tasks will get a chance to run prior to the system sleeping again. It is safe to call this from an ISR.