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 "ast.h"
#include "osc.h"

Functions

static void ast_alarm_callback (void)
 Callback handler for AST alarm Interrupt. More...
 
static void config_ast (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...
 

Variables

uint32_t ast_alarm
 
uint32_t ast_counter
 

static void ast_alarm_callback ( void  )
static

Callback handler for AST alarm Interrupt.

References ast_clear_interrupt_flag(), ast_disable_interrupt(), and AST_INTERRUPT_ALARM.

Referenced by config_ast().

void sm_init ( void  )
void sm_sleep ( uint32_t  interval)

This function puts the device to sleep.

This function puts the transceiver and device to sleep.

References ast_alarm, ast_counter, ast_enable_interrupt(), AST_INTERRUPT_ALARM, ast_read_counter_value(), ast_write_alarm0_value(), and sleepmgr_enter_sleep().

Referenced by APP_TaskHandler().

uint32_t ast_alarm

Referenced by sm_sleep().

uint32_t ast_counter