Copyright (c) 2014-2018 Microchip Technology Inc.
and its subsidiaries.
#include "sleep_mgr.h"
#include "rtc_count.h"
#include "system.h"
#include "rtc_count_interrupt.h"
#include "asf.h"
Functions | |
static void | configure_rtc_callbacks (void) |
Configuring RTC Callback Function on Overflow. More... | |
static void | rtc_overflow_callback (void) |
Callback Function indicating RTC Overflow. More... | |
void | sm_init (void) |
This function Initializes the Sleep functions Enable RTC Clock in conf_clocks.h. More... | |
void | sm_sleep (uint32_t interval) |
This function puts the transceiver and device to sleep. More... | |
Variables | |
struct rtc_module | rtc_instance |
|
static |
Configuring RTC Callback Function on Overflow.
void |
References RTC_COUNT_CALLBACK_OVERFLOW, rtc_count_enable_callback(), rtc_count_register_callback(), rtc_instance, and rtc_overflow_callback().
Referenced by sm_init(), and sm_sleep().
|
static |
Callback Function indicating RTC Overflow.
void |
References rtc_count_disable(), and rtc_instance.
Referenced by configure_rtc_callbacks().
void sm_init | ( | void | ) |
This function Initializes the Sleep functions Enable RTC Clock in conf_clocks.h.
This function Initializes the Sleep functions.
Continuously update the counter value so no synchronization is needed for reading.
References configure_rtc_callbacks(), rtc_count_config::continuously_update, rtc_count_config::mode, rtc_count_config::prescaler, rtc_count_get_config_defaults(), rtc_count_init(), RTC_COUNT_MODE_16BIT, RTC_COUNT_PRESCALER_DIV_1, and rtc_instance.
Referenced by wsndemo_init().
void sm_sleep | ( | uint32_t | interval | ) |
This function puts the transceiver and device to sleep.
References configure_rtc_callbacks(), rtc_count_enable(), rtc_count_set_period(), rtc_instance, system_set_sleepmode(), system_sleep(), and SYSTEM_SLEEPMODE_STANDBY.
Referenced by APP_TaskHandler().
struct rtc_module rtc_instance |
Referenced by configure_rtc_callbacks(), rtc_overflow_callback(), sm_init(), and sm_sleep().