System.h
Go to the documentation of this file.
86 4,
96 };
180 queueCallback([](void* param) { static_cast<ISystemReadyHandler*>(param)->onSystemReady(); }, readyHandler);
201 return queueCallback(reinterpret_cast<TaskCallback32>(callback), reinterpret_cast<uint32_t>(param));
Interface class implemented by classes to support on-ready callback.
Definition: System.h:56
static unsigned getTaskCount()
Get number of tasks currently on queue.
Definition: System.h:225
static bool queueCallback(TaskCallback32 callback, uint32_t param=0)
Queue a deferred callback.
static unsigned getMaxTaskCount()
Get maximum number of tasks seen on queue at any one time.
Definition: System.h:239
void onReady(SystemReadyDelegate readyHandler)
Set handler for system ready event.
Definition: System.h:168
CpuFrequency getCpuFrequency()
Get the CPU frequency.
Definition: System.h:142
static bool queueCallback(TaskDelegate callback)
Queue a deferred Delegate callback.
bool setCpuFrequency(CpuFrequency freq)
Set the CPU frequency.
Definition: System.h:134
void onReady(ISystemReadyHandler *readyHandler)
Set handler for system ready event.
Definition: System.h:177
bool deepSleep(uint32_t timeMilliseconds, DeepSleepOptions options=eDSO_RF_CAL_BY_INIT_DATA)
Enter deep sleep mode. Deep sleep turns off processor and keeps only the RTC memory active.
static bool queueCallback(TaskCallback callback, void *param=nullptr)
Queue a deferred callback, with optional void* parameter.
Definition: System.h:199
static bool queueCallback(InterruptCallback callback)
Queue a deferred callback with no callback parameter.
Definition: System.h:207
void(*)(uint32_t param) TaskCallback32
Task callback function type, uint32_t parameter.
Definition: System.h:37
void(*)(void *param) TaskCallback
Task callback function type, void* parameter.
Definition: System.h:42
@ eDSO_DISABLE_RF
disable RF after deep-sleep wake up, just like modem sleep, there will be the smallest current.
Definition: System.h:85
@ eDSO_RF_CAL_BY_INIT_DATA
RF_CAL or not after deep-sleep wake up, depends on init data byte 108.
Definition: System.h:82
@ eDSO_RF_CAL_ALWAYS
RF_CAL after deep-sleep wake up, there will be large current.
Definition: System.h:83
@ eDSO_RF_CAL_NEVER
no RF_CAL after deep-sleep wake up, there will only be small current.
Definition: System.h:84