Microchip® Advanced Software Framework

sleep_mgr.c File Reference

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 CONFIG_MACSC_HZ   (62500)

Referenced by sm_sleep().

static void cmp3_int_cb ( void  )
static

References macsc_disable().

Referenced by sm_init().

void sm_sleep ( uint32_t  interval)

This function puts the device to sleep.

This function puts the transceiver and device to sleep.

Parameters
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().