WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hal_power_save.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2020-2022. All rights reserved.
3 * Description: Header file of HAL power save public interfaces .
4 * Create: 2020-8-8
5 */
6#ifndef __HAL_POWER_SAVE_H__
7#define __HAL_POWER_SAVE_H__
8
9#include "hal_common_ops.h"
10
11/*****************************************************************************
12 * 1 其他头文件包含
13 *****************************************************************************/
14/*****************************************************************************
15 * STA ps feature
16 *****************************************************************************/
17#ifdef _PRE_WLAN_FEATURE_TXOPPS
18/*****************************************************************************
19 * 功能描述 : 设置PA_TXOP_PS_CTRL_REG寄存器中使能字段
20 *****************************************************************************/
21static INLINE__ osal_void hal_set_txop_ps_enable(hal_to_dmac_device_stru *hal_device, osal_u8 on_off)
22{
23 hal_public_hook_func(_set_txop_ps_enable)(hal_device, on_off);
24}
25
26/*****************************************************************************
27 * 功能描述 : 设置PA_TXOP_PS_CTRL_REG寄存器中condition1使能
28 *****************************************************************************/
29static INLINE__ osal_void hal_set_txop_ps_condition1(osal_u8 on_off)
30{
31 hal_public_hook_func(_set_txop_ps_condition1)(on_off);
32}
33
34/*****************************************************************************
35 * 功能描述 : 设置PA_TXOP_PS_CTRL_REG寄存器中conditon2使能字段
36 *****************************************************************************/
37static INLINE__ osal_void hal_set_txop_ps_condition2(osal_u8 on_off)
38{
39 hal_public_hook_func(_set_txop_ps_condition2)(on_off);
40}
41
42/*****************************************************************************
43 * 功能描述 : 设置mac partial aid寄存器
44 *****************************************************************************/
45static INLINE__ osal_void hal_set_txop_ps_partial_aid(const hal_to_dmac_vap_stru *hal_vap, osal_u32 partial_aid)
46{
47 hal_public_hook_func(_set_txop_ps_partial_aid)(hal_vap, partial_aid);
48}
49#endif
50
51#ifdef _PRE_WLAN_FEATURE_SMPS
52/*****************************************************************************
53 * 功能描述 : 设置PA_SMPS_CTRL_REG寄存器中SMPS的模式
54 *****************************************************************************/
55static INLINE__ osal_void hal_set_smps_mode(osal_u8 smps_mode)
56{
57 hal_public_hook_func(_set_smps_mode)(smps_mode);
58}
59#endif
60/*****************************************************************************
61 功能描述 : 低功耗唤醒后清除rx中断,防止rx中断里保留上一次睡前的值造成rx new
62*****************************************************************************/
63static INLINE__ osal_void hal_psm_clear_mac_rx_isr(osal_void)
64{
65 hal_public_hook_func(_psm_clear_mac_rx_isr)();
66}
67
68#ifndef _PRE_WLAN_FEATURE_WS63
69/*****************************************************************************
70 * 功能描述 : 设置mac aid寄存器
71 *****************************************************************************/
72static INLINE__ osal_void hal_set_mac_aid(const hal_to_dmac_vap_stru *hal_vap, osal_u16 aid)
73{
74 hal_public_hook_func(_set_mac_aid)(hal_vap, aid);
75}
76
77/*****************************************************************************
78 * 功能描述 : 设置PSM寄存器中tbtt offset的值
79 *****************************************************************************/
80static INLINE__ osal_void hal_set_tbtt_offset(const hal_to_dmac_vap_stru *hal_vap, osal_u16 offset)
81{
82 hal_public_hook_func(_set_tbtt_offset)(hal_vap, offset);
83}
84
85/*****************************************************************************
86 * 功能描述 : 设置PSM寄存器中ext tbtt offset的值
87 *****************************************************************************/
88static INLINE__ osal_void hal_set_psm_ext_tbtt_offset(const hal_to_dmac_vap_stru *hal_vap, osal_u16 offset)
89{
90 hal_public_hook_func(_set_psm_ext_tbtt_offset)(hal_vap, offset);
91}
92
93/*****************************************************************************
94 * 功能描述 : 设置beacon period寄存器
95 *****************************************************************************/
96static INLINE__ osal_void hal_vap_set_psm_beacon_period(const hal_to_dmac_vap_stru *hal_vap,
97 osal_u32 beacon_period)
98{
99 hal_public_hook_func(_set_psm_beacon_period)(hal_vap, beacon_period);
100}
101
102/*****************************************************************************
103 * 功能描述 : 设置beacon等待的超时值
104 *****************************************************************************/
105static INLINE__ osal_void hal_set_beacon_timeout(osal_u16 value)
106{
107 hal_public_hook_func(_set_beacon_timeout)(value);
108}
109
110/*****************************************************************************
111 * AP ps feature
112 *****************************************************************************/
113/*****************************************************************************
114 * 功能描述 : 使能sta ps ctrl寄存器
115 *****************************************************************************/
116static INLINE__ osal_void hal_tx_enable_peer_sta_ps_ctrl(osal_u8 lut_index)
117{
118 hal_public_hook_func(_tx_enable_peer_sta_ps_ctrl)(lut_index);
119}
120
121/*****************************************************************************
122 * 功能描述 : 去使能sta ps ctrl寄存器
123 *****************************************************************************/
124static INLINE__ osal_void hal_tx_disable_peer_sta_ps_ctrl(osal_u8 lut_index)
125{
126 hal_public_hook_func(_tx_disable_peer_sta_ps_ctrl)(lut_index);
127}
128
129/*****************************************************************************
130 * 功能描述 : 禁能resp_ps_bit_ctrl
131 *****************************************************************************/
132static INLINE__ osal_void hal_tx_disable_resp_ps_bit_ctrl(osal_u8 lut_index)
133{
134 hal_public_hook_func(_tx_disable_resp_ps_bit_ctrl)(lut_index);
135}
136#endif
137#ifdef _PRE_WLAN_FEATURE_WUR_TX
138static INLINE__ osal_void hal_vap_send_wur_beacon_pkt(wur_bcn_reg_param_stru *wur_bcn_param)
139{
140 hal_public_hook_func(_vap_send_wur_beacon_pkt)(wur_bcn_param);
141}
142
143static INLINE__ osal_void hal_vap_set_wur_twbtt(osal_u16 wur_offset_twbtt, osal_u8 twbtt_en)
144{
145 hal_public_hook_func(_vap_set_wur_twbtt)(wur_offset_twbtt, twbtt_en);
146}
147
148static INLINE__ osal_void hal_vap_set_wur_beacon_en(osal_u8 wur_bcn_data_rate, osal_u8 wur_bcn_vap_en)
149{
150 hal_public_hook_func(_vap_set_wur_beacon_en)(wur_bcn_data_rate, wur_bcn_vap_en);
151}
152
153static INLINE__ osal_void hal_write_wur_beacon(osal_u16 id)
154{
155 hal_public_hook_func(_write_wur_beacon)(id);
156}
157
158static INLINE__ osal_void hal_write_wur_fl_wake(wur_wakeup_reg_param_stru *wur_wakeup_param)
159{
160 hal_public_hook_func(_write_wur_fl_wake)(wur_wakeup_param);
161}
162
163static INLINE__ osal_void hal_write_wur_short_wake(osal_u16 wur_id)
164{
165 hal_public_hook_func(_write_wur_short_wake)(wur_id);
166}
167
168static INLINE__ osal_void hal_vap_set_wur(const hal_to_dmac_vap_stru *hal_vap, wur_reg_param_stru *wur_param,
169 osal_u8 count)
170{
171 hal_public_hook_func(_vap_set_wur)(hal_vap, wur_param, count);
172}
173#endif
174
175#endif /* end of hal_power_save.h */
176
#define hal_public_hook_func(_func)
Definition hal_ops_common_rom.h:85
#define INLINE__
Definition osal_list.h:25
unsigned char osal_u8
Definition osal_types.h:11
void osal_void
Definition osal_types.h:29
unsigned int osal_u32
Definition osal_types.h:13
unsigned short osal_u16
Definition osal_types.h:12
Definition hal_ops_common_rom.h:529
Definition hal_common_ops_device_rom.h:870