Microchip® Advanced Software Framework

system_low_power.c File Reference

Low power management file.

Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.

#include <stdint.h>
#include <stdbool.h>
#include "system_low_power.h"
#include "sw_timer.h"
#include "sys.h"

Functions

void EUSART1WakeUp (void)
 
static void OnSleepTimerEvent (uint8_t param))
 
static void SysCfgLowPower (void))
 
static void SysCfgRun (void)
 
void SysExitFromSleep (void)
 
SysSleepState_t SysGetGoToSleepState (void)
 
void SysGoToSleep (void)
 
void SysSetGoToSleepState (SysSleepState_t sleepState)
 
void SysSleepInit (exitFromSleepCb_t exitFromSleepCb)
 
void SysSleepStart (uint32_t ms)
 

Variables

static volatile SysSleepState_t eusart1WakeUpState = SLEEP_ON
 
static volatile bool exitFromSleep = false
 
static volatile SysSleepState_t goToSleep = SLEEP_OFF
 
static exitFromSleepCb_t pExitFromSleepCb
 
static uint8_t sleepTimerId
 

void EUSART1WakeUp ( void  )
static void OnSleepTimerEvent ( uint8_t  param)
static
static void SysCfgLowPower ( void  )
static
static void SysCfgRun ( void  )
static

Referenced by SysExitFromSleep().

void SysExitFromSleep ( void  )
SysSleepState_t SysGetGoToSleepState ( void  )

References goToSleep.

void SysGoToSleep ( void  )
void SysSetGoToSleepState ( SysSleepState_t  sleepState)

References exitFromSleep, goToSleep, and SLEEP_OFF.

Referenced by EUSART1WakeUp(), and OnSleepTimerEvent().

void SysSleepInit ( exitFromSleepCb_t  exitFromSleepCb)
void SysSleepStart ( uint32_t  ms)

volatile SysSleepState_t eusart1WakeUpState = SLEEP_ON
static

Referenced by EUSART1WakeUp().

volatile bool exitFromSleep = false
static
volatile SysSleepState_t goToSleep = SLEEP_OFF
static
exitFromSleepCb_t pExitFromSleepCb
static

Referenced by SysExitFromSleep().

uint8_t sleepTimerId
static

Referenced by SysExitFromSleep().