-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsleep_routines.h
44 lines (37 loc) · 1.41 KB
/
sleep_routines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* @file sleep_routines.h
* @date 2/13/20
* @author Connor Humiston
* @brief This module defines energy modes and functions for sleeping
*/
#ifndef SRC_HEADER_FILES_SLEEP_ROUTINES_H
#define SRC_HEADER_FILES_SLEEP_ROUTINES_H
//***********************************************************************************
// Include files
//***********************************************************************************
#include "em_emu.h"
#include "em_int.h"
#include "em_assert.h"
#include "em_core.h"
//#include "lddbool.h"
//***********************************************************************************
// defined files
//***********************************************************************************
#define EM0 0
#define EM1 1
#define EM2 2
#define EM3 3
#define EM4 4
#define MAX_ENERGY_MODES 5
//***********************************************************************************
// global variables
//***********************************************************************************
//***********************************************************************************
// function prototypes
//***********************************************************************************
void sleep_open(void);
void sleep_block_mode(uint32_t EM);
void sleep_unblock_mode(uint32_t EM);
void enter_sleep(void);
uint32_t current_block_energy_mode(void);
#endif