uint32_t UTIL_sleepInit(void)
Sets up the RTC timer used for sleep functions.
uint32_t RTCDRV_TimerID_t
Timer ID.
#define ECODE_EMDRV_RTCDRV_OK
Success return value.
void EMU_EnterEM2(bool restore)
Enter energy mode 2 (EM2).
Ecode_t RTCDRV_AllocateTimer(RTCDRV_TimerID_t *id)
Allocate timer.
Ecode_t RTCDRV_TimeRemaining(RTCDRV_TimerID_t id, uint32_t *timeRemaining)
Get time left before a given timer expires.
RTCDRV timer API definition.
uint32_t UTIL_waitForEvent(uint32_t timeout)
Delays number of milliseconds in sleep mode (EM2) using the RTC but but returns if an event wakes up ...
static volatile bool rtcComplete
Ecode_t RTCDRV_Init(void)
Initialize RTCDRV driver.
Utility Functions for the Thunderboard Sense.
static void rtcCb(RTCDRV_TimerID_t id, void *user)
RTC callback function, called when the timer expired.
Energy management unit (EMU) peripheral API.
Ecode_t RTCDRV_StartTimer(RTCDRV_TimerID_t id, RTCDRV_TimerType_t type, uint32_t timeout, RTCDRV_Callback_t callback, void *user)
Start a timer.
void SysTick_Handler(void)
Interrupt Service Routine for system tick counter.
static RTCDRV_TimerID_t rtcId
void UTIL_sleep(uint32_t ms)
Delays number of milliseconds in sleep mode (EM2) using the RTC.