RUI3 (RAK Unified Interface 3) - RAK4631
udrv_powersave.h
Go to the documentation of this file.
1 #ifndef _UDRV_POWERSAVE_H_
2 #define _UDRV_POWERSAVE_H_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <stdint.h>
9 #include <udrv_timer.h>
10 
11 typedef void (*POWER_SAVE_HANDLER) (void);
12 
13 //The structure of powersave function
15  void (*MCU_SLEEP) (uint32_t level);
16  void (*SYS_CLOCK_INIT) (void);
17  void (*SYS_CLOCK_ON) (void);
18  void (*SYS_CLOCK_OFF) (void);
19 };
20 
21 void udrv_powersave_wake_lock (void);
22 void udrv_powersave_wake_unlock (void);
23 int32_t udrv_mcu_sleep_ms (uint32_t ms_time);
24 void udrv_radio_sleep_ms (uint32_t ms_time);
25 int32_t udrv_sleep_ms (uint32_t ms_time);
26 void udrv_clock_init (void);
27 void udrv_clock_on (void);
28 void udrv_clock_off (void);
33 void udrv_set_min_wakeup_time(uint32_t ms_time);
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
39 #endif // #ifndef _UDRV_POWERSAVE_H_
void udrv_powersave_wake_unlock(void)
void(* SYS_CLOCK_ON)(void)
Definition: udrv_powersave.h:17
void udrv_deregister_wakeup_callback(POWER_SAVE_HANDLER handler)
void(* MCU_SLEEP)(uint32_t level)
Definition: udrv_powersave.h:15
void(* SYS_CLOCK_OFF)(void)
Definition: udrv_powersave.h:18
void udrv_deregister_sleep_callback(POWER_SAVE_HANDLER handler)
int32_t udrv_sleep_ms(uint32_t ms_time)
void udrv_clock_on(void)
void udrv_clock_off(void)
int32_t udrv_register_wakeup_callback(POWER_SAVE_HANDLER handler)
Definition: udrv_powersave.h:14
void(* POWER_SAVE_HANDLER)(void)
Definition: udrv_powersave.h:11
void udrv_register_sleep_callback(POWER_SAVE_HANDLER handler)
void(* SYS_CLOCK_INIT)(void)
Definition: udrv_powersave.h:16
void udrv_radio_sleep_ms(uint32_t ms_time)
void udrv_powersave_wake_lock(void)
void udrv_clock_init(void)
void udrv_set_min_wakeup_time(uint32_t ms_time)
int32_t udrv_mcu_sleep_ms(uint32_t ms_time)