SLEEP_Init_t Struct ReferenceEMDRV > SLEEP

Initialization structure for the sleep driver. This includes optional callback functions that can be used by the application to get notified about sleep related events and that can be used to control the MCU behavior when waking up from sleep.

Definition at line 202 of file sleep.h .

#include < sleep.h >

Data Fields

uint32_t(* restoreCallback )( SLEEP_EnergyMode_t emode)
bool(* sleepCallback )( SLEEP_EnergyMode_t emode)
void(* wakeupCallback )( SLEEP_EnergyMode_t emode)

Field Documentation

uint32_t(* SLEEP_Init_t::restoreCallback) ( SLEEP_EnergyMode_t emode)

Pointer to the callback function that is being called after wake up and before the HF clock is restored. This function can be used by the application to signal that the sleep driver should wakeup normally or if it should skip restoring the HF clock and go back to sleep. Delaying HF clock restore is an advanced functionality that can be used to save power in a system with frequent interrupts.

These are the supported flags that can be returned from the callback function.

SLEEP_FLAG_NONE SLEEP_FLAG_NO_CLOCK_RESTORE

Definition at line 236 of file sleep.h .

Referenced by SLEEP_InitEx() , and SLEEP_Sleep() .

bool(* SLEEP_Init_t::sleepCallback) ( SLEEP_EnergyMode_t emode)

Pointer to the callback function that is being called before the device is going to sleep. This function is optional, if no sleep callback is needed by the application then this field must be set to NULL.

This callback function has a return value that can be used to force the sleep driver to not enter a sleep mode. This can be used in applications where for instance timing of events will make it inefficient to enter sleep at a certain point in time.

Definition at line 213 of file sleep.h .

Referenced by SLEEP_Init() , and SLEEP_InitEx() .

void(* SLEEP_Init_t::wakeupCallback) ( SLEEP_EnergyMode_t emode)

Pointer to the callback function that is being called after wake up. This function is optional, if no wake up callback is needed by the application then this field must be set to NULL.

Definition at line 220 of file sleep.h .

Referenced by SLEEP_Init() , and SLEEP_InitEx() .


The documentation for this struct was generated from the following file:
  • C:/repos/embsw_super_h1/platform/emdrv/sleep/inc/ sleep.h