Copyright (c) 2014-2018 Microchip Technology Inc.
and its subsidiaries.
#include "sleep_mgr.h"
#include "sleepmgr.h"
#include "conf_sleepmgr.h"
#include "macsc_megarf.h"
#include "sysclk.h"
Macros | |
#define | COMPARE_MODE MACSC_RELATIVE_CMP |
#define | CONFIG_MACSC_HZ (62500) |
Functions | |
static void | cmp3_int_cb (void) |
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 COMPARE_MODE MACSC_RELATIVE_CMP |
Referenced by example_cmp1_int_cb(), example_cmp2_int_cb(), example_cmp3_int_cb(), main(), sm_sleep(), and test_macsc_cmp().
#define CONFIG_MACSC_HZ (62500) |
Referenced by sm_sleep().
|
static |
References macsc_disable().
Referenced by sm_init().
void sm_init | ( | void | ) |
This function Initializes the Sleep functions.
References cmp3_int_cb(), MACSC_32KHz, MACSC_CC3, macsc_enable_cmp_int(), macsc_set_cmp3_int_cb(), macsc_sleep_clk_enable(), macsc_write_clock_source(), sleep_set_mode(), SLEEP_SMODE_PSAVE, and sysclk_enable_peripheral_clock().
Referenced by main(), and wsndemo_init().
void sm_sleep | ( | uint32_t | interval | ) |
This function puts the device to sleep.
This function puts the transceiver and device to sleep.
interval | : in seconds for the device to sleep.Range of Interval is 1-68719s |
References COMPARE_MODE, CONFIG_MACSC_HZ, MACSC_CC3, macsc_enable(), macsc_enable_manual_bts(), macsc_use_cmp(), sleep_enable(), and sleep_enter.
Referenced by APP_TaskHandler().