WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
pm_porting.h
浏览该文件的文档.
1
10#ifndef PM_PORTING_H
11#define PM_PORTING_H
12
13#include "common_def.h"
14#include "osal_types.h"
15#include "errcode.h"
16
17#ifdef __cplusplus
18#if __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21#endif /* __cplusplus */
22
23/* 本模块类型定义 */
31
32#ifdef CONFIG_PM_SUPPORT_SRV_DECOUPLING
33typedef enum {
34 PM_MODE_INIT,
35 PM_MODE_SUSPEND,
36 PM_MODE_RESUME,
37 PM_MODE_WORK,
38 PM_MODE_MAX,
39} pm_srv_mode;
40
41typedef enum {
42 PM_SRV_WIFI,
43 PM_SRV_BLE,
44 PM_SRV_SLE,
45 PM_SRV_PLAT, // 必须是最后一个
46 PM_SRV_MAX,
47} pm_srv_type;
48
49errcode_t pm_porting_init(void);
50errcode_t pm_set_srv_mode(pm_srv_type svr, pm_srv_mode mode); // 投票接口
51#endif
52
53typedef void (*pm_hook_cb_t)(void);
54
55/* extern 引用其他模块函数 */
56extern void test_suite_uart_init(void);
57extern void at_uart_init(void);
58extern void set_efuse_period(void);
60
61extern uint32_t bt_thread_open_btc(void);
62extern uint32_t bt_thread_close_btc(void);
63extern void bt_vendor_init(void);
64extern errcode_t enable_ble(void);
66
67/* 本模块函数接口声明 */
68void pm_port_open_rf(void);
69void pm_port_close_rf(void);
70void pm_port_open_wifi_sub(void);
71void pm_port_close_wifi_sub(void);
72void pm_port_open_bt_sub(void);
73void pm_port_close_bt_sub(void);
74
75void pm_port_open_wifi_hw(void);
76void pm_port_close_wifi_hw(void);
77void pm_port_open_bt_hw(void);
78void pm_port_close_bt_hw(void);
79
81void pm_port_flash_sem_up(void);
82int pm_port_dma_sem_down(void);
83void pm_port_dma_sem_up(void);
84
89
90void pm_port_pm_hook_cb_register(uint32_t hook, pm_hook_cb_t cb);
91
92void pm_port_enter_lowpower(void);
93void pm_port_exit_lowpower(void);
94
96
102
104
105#ifdef __cplusplus
106#if __cplusplus
107}
108#endif /* __cplusplus */
109#endif /* __cplusplus */
110
111#endif
uint32_t errcode_t
Definition of error code.
Definition errcode.h:30
void set_efuse_period(void)
Definition efuse_porting.c:117
osal_u8 type
Definition oal_net.h:0
unsigned char osal_u8
Definition osal_types.h:11
void osal_void
Definition osal_types.h:29
pm_lpc_type
Definition pm_porting.h:97
@ PM_LIGHT_SLEEP
Definition pm_porting.h:99
@ PM_NO_SLEEP
Definition pm_porting.h:98
@ PM_DEEP_SLEEP
Definition pm_porting.h:100
void pm_port_open_rf(void)
Definition pm_porting.c:283
int pm_port_flash_sem_down(void)
Definition pm_porting.c:456
void pm_port_close_bt_sub(void)
Definition pm_porting.c:361
void pm_port_exit_lowpower_prepare_cb_default(void)
Definition pm_porting.c:593
void pm_port_flash_sem_up(void)
Definition pm_porting.c:472
void pm_port_enter_lowpower_prepare_cb_default(void)
Definition pm_porting.c:515
pm_hook_t
Definition pm_porting.h:24
@ PM_HOOK_EXIT_LOWPOWER_FINISH
Definition pm_porting.h:28
@ PM_HOOK_ENTER_LOWPOWER_PREPARE
Definition pm_porting.h:25
@ PM_HOOK_MAX_NUM
Definition pm_porting.h:29
@ PM_HOOK_ENTER_LOWPOWER_FINISH
Definition pm_porting.h:26
@ PM_HOOK_EXIT_LOWPOWER_PREPARE
Definition pm_porting.h:27
errcode_t disable_ble(void)
void pm_port_close_wifi_sub(void)
Definition pm_porting.c:344
void at_uart_init(void)
Definition uart_porting.c:282
void test_suite_uart_init(void)
errcode_t enable_ble(void)
void pm_port_exit_lowpower(void)
Definition pm_porting.c:881
void pm_port_open_bt_sub(void)
Definition pm_porting.c:353
uint32_t bt_thread_close_btc(void)
void pm_port_open_wifi_hw(void)
Definition pm_porting.c:369
void(* pm_hook_cb_t)(void)
Definition pm_porting.h:53
uint32_t bt_thread_open_btc(void)
void pm_porting_wait_exit_lowpower(void)
Definition pm_porting.c:1053
void pm_port_dma_sem_up(void)
Definition pm_porting.c:498
void pm_port_enter_lowpower(void)
Definition pm_porting.c:719
int pm_port_dma_sem_down(void)
Definition pm_porting.c:482
void pm_port_open_wifi_sub(void)
Definition pm_porting.c:335
void pm_port_pm_hook_cb_register(uint32_t hook, pm_hook_cb_t cb)
Definition pm_porting.c:506
void pm_port_exit_lowpower_finish_cb_default(void)
Definition pm_porting.c:616
osal_void cali_set_cali_done_flag(osal_u8 is_done)
void pm_port_close_rf(void)
Definition pm_porting.c:319
void pm_port_enter_lowpower_finish_cb_default(void)
Definition pm_porting.c:558
void bt_vendor_init(void)
void pm_port_close_bt_hw(void)
Definition pm_porting.c:432
void pm_port_close_wifi_hw(void)
Definition pm_porting.c:390
errcode_t pm_port_set_sleep_mode(int32_t type)
void pm_port_open_bt_hw(void)
Definition pm_porting.c:411