| BlueNRG-1 HAL drivers APIs

- Main Page
- Classes
- Files

- File List
- File Members

sleep.h
Go to the documentation of this file.
1
21 #ifndef __SLEEP_H__
22 #define __SLEEP_H__
23
24 #include "BlueNRG1.h"
25
40 typedef enum {
41 SLEEPMODE_RUNNING = 0,
42 SLEEPMODE_CPU_HALT = 1,
43 SLEEPMODE_WAKETIMER = 2,
44 SLEEPMODE_NOTIMER = 3,
45 } SleepModes;
46
48 #define WAKEUP_IO9 0x01
49
51 #define WAKEUP_IO10 0x02
52
54 #define WAKEUP_IO11 0x04
55
57 #define WAKEUP_IO12 0x08
58
60 #define WAKEUP_IO13 0x10
61
63 #define WAKEUP_SLEEP_TIMER1 0x20
64
66 #define WAKEUP_SLEEP_TIMER2 0x40
67
69 #define WAKEUP_BOR 0xF0
70
72 #define WAKEUP_POR 0xF1
73
75 #define WAKEUP_SYS_RESET_REQ 0xF2
76
78 #define WAKEUP_RESET_WDG 0xF3
79
81 #define NO_WAKEUP_RESET 0xFF;
82
84 #define WAKEUP_IO_LOW 0x00
85
87 #define WAKEUP_IO_HIGH 0x01
88
90 #define BLUENRG_SLEEP_CONFIGURATION_ERROR 0xFE
91
93 #define SLEEP_TIMER 0
94
121 uint8_t BlueNRG_Sleep(SleepModes sleepMode,
122 uint8_t gpioWakeBitMask,
123 uint8_t gpioWakeLevelMask,
124 uint32_t sleep_time);
125
135 SleepModes App_SleepMode_Check(SleepModes sleepMode);
136
141 void BlueNRG_IdleSleep(void);
142
158 uint8_t BlueNRG_WakeupSource(void);
159
160 #endif
SLEEPMODE_RUNNING
Definition: sleep.h:41
SLEEPMODE_NOTIMER
Definition: sleep.h:44
App_SleepMode_Check
SleepModes App_SleepMode_Check(SleepModes sleepMode)
This function shall check if the BlueNRG Sleep mode selected is safe in according with the applicatio...
BlueNRG_Sleep
uint8_t BlueNRG_Sleep(SleepModes sleepMode, uint8_t gpioWakeBitMask, uint8_t gpioWakeLevelMask, uint32_t sleep_time)
Puts the BlueNRG in power save. The device can be configured with different wake sources according th...
SLEEPMODE_WAKETIMER
Definition: sleep.h:43
BlueNRG_IdleSleep
void BlueNRG_IdleSleep(void)
This function executes a wait for interrupt instruction and suspends the core execution until one of ...
SleepModes
SleepModes
Enumerations for the possible microcontroller sleep modes.
Definition: sleep.h:40
SLEEPMODE_CPU_HALT
Definition: sleep.h:42
BlueNRG_WakeupSource
uint8_t BlueNRG_WakeupSource(void)
Return the wakeup source from deep sleep. Possible value are: