app_pwr_mgmt.h
Go to the documentation of this file.
1 
52 #ifndef _APP_PWR_MGMT_H_
53 #define _APP_PWR_MGMT_H_
54 
55 #include "gr55xx_pwr.h"
56 #include "app_drv_config.h"
57 #include <stdint.h>
58 #include <stdbool.h>
59 
66 #define APP_SLEEP_CB_MAX 16
67 
75 typedef int16_t pwr_id_t;
76 
80 typedef struct
81 {
82  bool (*app_prepare_for_sleep)(void);
83  void (*app_sleep_canceled)(void);
84  void (*app_wake_up_ind)(void);
89 /* Exported functions --------------------------------------------------------*/
103 
111 
117 void pwr_wake_up_ind(void);
118 
127 #endif
128 
wakeup_priority_t
wakeup_priority_t
APP driver peripheral wakeup priority define.
Definition: app_drv_config.h:136
pwr_enter_sleep_check
pwr_mgmt_dev_state_t pwr_enter_sleep_check(void)
Check peripheral status before going to sleep.
pwr_id_t
int16_t pwr_id_t
PWR id.
Definition: app_pwr_mgmt.h:75
pwr_unregister_sleep_cb
void pwr_unregister_sleep_cb(pwr_id_t id)
Unregister PWR sleep callback function.
pwr_wake_up_ind
void pwr_wake_up_ind(void)
Things to do after waking up.
gr55xx_pwr.h
GR55XX Platform Power Manager Module API.
pwr_register_sleep_cb
pwr_id_t pwr_register_sleep_cb(const app_sleep_callbacks_t *p_cb, wakeup_priority_t wakeup_priority)
set PWR sleep callback function
pwr_mgmt_dev_state_t
pwr_mgmt_dev_state_t
power manager device work state.
Definition: gr55xx_pwr.h:95
app_drv_config.h
Header file of app driver config code.
app_sleep_callbacks_t
PWR sleep check function Structure.
Definition: app_pwr_mgmt.h:81