Copyright (c) 2014-2018 Microchip Technology Inc.
and its subsidiaries.
Macros | |
#define | RTC32_SyncBusy() (RTC32.SYNCCTRL & RTC32_SYNCBUSY_bm) |
This macro returns the RTC32 CNT/CTRL write synchronization flag. More... | |
#define | RTC32_SyncCnt() (RTC32.SYNCCTRL |= RTC32_SYNCCNT_bm) |
This macro initiates read synchronization of the RTC32 CNT register. More... | |
#define | RTC32_SyncCntBusy() (RTC32.SYNCCTRL & RTC32_SYNCCNT_bm) |
This macro returns the RTC32 CNT read synchronization flag. More... | |
Functions | |
ISR (RTC32_COMP_vect) | |
static void | RTC32_Initialize (uint32_t period, uint32_t count, uint32_t compareValue) |
static void | RTC32_SetTimeout (uint32_t alarmTimeout) |
void | sm_init (void) |
This function Initializes the Sleep functions. More... | |
void | sm_sleep (uint32_t interval) |
This function puts the device to sleep. More... | |
#define RTC32_SyncBusy | ( | ) | (RTC32.SYNCCTRL & RTC32_SYNCBUSY_bm) |
This macro returns the RTC32 CNT/CTRL write synchronization flag.
Referenced by RTC32_Initialize().
#define RTC32_SyncCnt | ( | ) | (RTC32.SYNCCTRL |= RTC32_SYNCCNT_bm) |
This macro initiates read synchronization of the RTC32 CNT register.
Initiates synchronization of CNT register from RTC to system clock domain.
Referenced by RTC32_SetTimeout().
#define RTC32_SyncCntBusy | ( | ) | (RTC32.SYNCCTRL & RTC32_SYNCCNT_bm) |
This macro returns the RTC32 CNT read synchronization flag.
Referenced by RTC32_SetTimeout().
ISR | ( | RTC32_COMP_vect | ) |
|
static |
References cpu_irq_restore(), cpu_irq_save(), delay_us, and RTC32_SyncBusy.
Referenced by sm_init().
|
static |
References RTC32_SyncCnt, and RTC32_SyncCntBusy.
Referenced by sm_sleep().
void sm_init | ( | void | ) |
This function Initializes the Sleep functions.
References RTC32_Initialize(), sleepmgr_init(), sleepmgr_lock_mode(), SLEEPMGR_PSAVE, sysclk_enable_module(), SYSCLK_PORT_GEN, and SYSCLK_RTC.
Referenced by wsndemo_init().
void sm_sleep | ( | uint32_t | interval | ) |
This function puts the device to sleep.
This function puts the transceiver and device to sleep.
References RTC32_SetTimeout(), and sleepmgr_enter_sleep().
Referenced by APP_TaskHandler().