WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hal_power_rom.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2020-2022. All rights reserved.
3 * Description: Header file for hal_power_rom.c.
4 */
5
6#ifndef HAL_POWER_ROM_H
7#define HAL_POWER_ROM_H
8
9/*****************************************************************************
10 1 其他头文件包含
11*****************************************************************************/
12#include "hal_soc_rom.h"
13#include "hal_mac_rom.h"
14#include "hal_phy_rom.h"
15
16#include "oal_ext_if_rom.h"
17#include "hal_ext_if_rom.h"
18#include "wlan_types_rom.h"
19#ifdef __cplusplus
20#if __cplusplus
21extern "C" {
22#endif
23#endif
24
25/*****************************************************************************
26 2 宏定义
27*************************************************************************/
28/* 定制化相关宏 */
29#define HAL_NUM_OF_CUST_TXPOWER_SCALING_TABLE 1024 /* 协议速率查询表最大发射功率参数的个数 */
30#define HAL_INIT_NVM_MAX_TXPWR_BASE_2P4G 190 /* 基准最大发射功率初始值 0.1dbm */
31#define HAL_INIT_NVM_MAX_TXPWR_BASE_5G 170
32#define HAL_MAX_TXPOWER_MIN 130 /* 最大发送功率的最小有效值:130 13.0dbm */
33#define HAL_MAX_TXPOWER_MAX 238 /* 最大发送功率的最大有效值:238 23.8dbm */
34
35#define HH503_PHY_POWER_REF_2G_DEFAULT 0x14E8FC /* POWER REF 2G默认值取mt7对应值 */
36#define HH503_PHY_POWER_REF_5G_DEFAULT 0x0ce0f4
37
38/* tpc */
39#define HAL_TPC_CH_NUM 32 /* tpc_ch档位总计有32档 */
40
41/* PGA STEP */
42#define HAL_PGA_STEP_NUM 64 /* PGA STEP档位总计有64档 */
43
44/* PGA STEP */
45#define HAL_POWER_CHANGE_COEF 10 /* POWER转换系数 */
46
47/* 32档位UPC LUT的增益间隔粒度为0.5,扩大10倍用于计算,0.5*ALG_TPC_POW_PRECISION_SHIFT */
48#define HAL_POW_LPF_LUT_NUM 8 /* 筛选使用的LPF档位数目 */
49#define HAL_POW_DAC_LUT_NUM 4 /* 筛选使用的DAC档位数目 */
50
51#define HAL_POW_DIST_5G_TABLE_LEN 13 /* 5G档位增益分配表长度 */
52#define HAL_POW_DIST_2G_TABLE_LEN 16 /* 2G档位增益分配表长度 */
53
54#ifdef _PRE_WLAN_ONLINE_DPD
55#define HH503_DPD_OFF_CFR_ON 2
56#define HH503_DPD_LVL_INVALID 3
57#endif
58#define HAL_RESP_POWER_REG_NUM 2
59
60#define hal_get_cfr_idx_from_tpc(tpc) ((osal_u8)(oal_get_bits((tpc), NUM_2_BITS, BIT_OFFSET_10)))
61#define hal_get_dpd_tpc_lv_ch0_from_tpc(tpc) ((osal_u8)(oal_get_bits((tpc), NUM_2_BITS, BIT_OFFSET_8)))
62#define hal_get_tpc_ch0_from_tpc(tpc) ((osal_u8)(oal_get_bits((tpc), NUM_8_BITS, BIT_OFFSET_0)))
63
64/*****************************************************************************
65 3 枚举定义
66*****************************************************************************/
67
68/*****************************************************************************
69 4 全局变量声明
70*****************************************************************************/
71
72/*****************************************************************************
73 7 STRUCT定义
74*****************************************************************************/
81
82typedef struct {
85 offset : 4;
87
88/*****************************************************************************
89 10 函数声明
90*****************************************************************************/
91
93 osal_u8 *center_freq_chn);
94
99 const tpc_code_params_stru *tpc_code);
101 osal_u8 subband_idx, wlan_user_distance_enum_uint8 distance_idx);
102/*****************************************************************************
103 11 ROM回调函数类型定义
104*****************************************************************************/
105/* hal */
107 wlan_channel_band_enum_uint8 band, osal_u8 channel_idx);
110
112 osal_s16 tx_power, tpc_code_params_stru *tpc_param);
119 osal_u8 mcs, osal_u8 bw, osal_u8 pwr_lvl);
121
122#ifdef __cplusplus
123#if __cplusplus
124}
125#endif
126#endif
127
128#endif
osal_u8 hal_pow_set_type_enum_uint8
Definition hal_common_ops_device_rom.h:336
osal_void(* hh503_set_tx_dscr_power_tpc_cb)(osal_u8 rate_idx, wlan_channel_band_enum_uint8 band, osal_s16 tx_power, tpc_code_params_stru *tpc_param)
Definition hal_power_rom.h:111
osal_void hh503_pow_init_vap_pow_code_ext(hal_to_dmac_device_stru *hal_device, hal_vap_pow_info_stru *vap_pow_info, hal_pow_set_type_enum_uint8 type, const mac_channel_stru *channel)
osal_void hal_sync_tpc_config_device(hal_to_dmac_device_stru *hal_device, osal_u8 *data, osal_u16 data_len)
osal_u32 hh503_rf_get_center_freq_chan_num(osal_u8 chan_number, wlan_channel_bandwidth_enum_uint8 bandwidth, osal_u8 *center_freq_chn)
osal_void(* hh503_pow_sw_initialize_tx_power_cb)(hal_to_dmac_device_stru *hal_device)
Definition hal_power_rom.h:113
osal_void hh503_pow_set_resp_tpc_code_to_pow_mode(hh503_tx_resp_phy_mode_reg_stru *pow_code, const tpc_code_params_stru *tpc_code)
osal_void(* hh503_get_cali_param_set_tpc_cb)(hal_to_dmac_device_stru *hal_device, wlan_channel_band_enum_uint8 band, osal_u8 channel_idx)
Definition hal_power_rom.h:106
osal_void(* hh503_pow_initialize_tx_power_cb)(hal_to_dmac_device_stru *hal_device)
Definition hal_power_rom.h:114
osal_void(* hh503_pow_init_vap_pow_code_cb)(hal_to_dmac_device_stru *hal_device, hal_vap_pow_info_stru *vap_pow_info, hal_pow_set_type_enum_uint8 type, const mac_channel_stru *channel)
Definition hal_power_rom.h:115
osal_u16(* fe_tpc_rate_pow_get_rate_tpc_code_cb)(osal_u8 band, osal_u8 protocol_mode, osal_u8 mcs, osal_u8 bw, osal_u8 pwr_lvl)
Definition hal_power_rom.h:118
osal_void(* hh503_tb_tx_power_init_cb)(wlan_channel_band_enum_uint8 band)
Definition hal_power_rom.h:109
osal_void(* fe_hal_sync_tpc_pow_rate_table_cb)(osal_u8 *data, osal_u16 data_len)
Definition hal_power_rom.h:117
osal_void(* hh503_tb_mcs_tx_power_cb)(wlan_channel_band_enum_uint8 band)
Definition hal_power_rom.h:108
osal_void hh503_set_ack_cts_pow_code(hal_to_dmac_device_stru *hal_device, wlan_channel_band_enum_uint8 band, osal_u8 subband_idx, wlan_user_distance_enum_uint8 distance_idx)
osal_u8 hal_device_get_pow_base_idx(osal_u8 protocol_idx, osal_u8 cap_idx)
osal_u8 type
Definition oal_net.h:0
unsigned char osal_u8
Definition osal_types.h:11
short osal_s16
Definition osal_types.h:18
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_common_ops_device_rom.h:746
Definition hal_mac_rom.h:132
Definition wlan_types_base_rom.h:258
Definition hal_power_rom.h:82
osal_s16 max_pow
Definition hal_power_rom.h:83
osal_s16 min_pow
Definition hal_power_rom.h:84
osal_s16 offset
Definition hal_power_rom.h:85
Definition hal_ops_common_rom.h:529
Definition hal_power_rom.h:75
osal_u16 bit_rsv
Definition hal_power_rom.h:79
osal_u16 cfr_idx
Definition hal_power_rom.h:78
osal_u16 dpd_tpc_lv_ch0
Definition hal_power_rom.h:77
osal_u16 tpc_ch0
Definition hal_power_rom.h:76
Definition hal_uart_v151_regs_def.h:38
osal_u8 wlan_channel_bandwidth_enum_uint8
Definition wlan_types_base_rom.h:237
osal_u8 wlan_channel_band_enum_uint8
Definition wlan_types_base_rom.h:97
osal_u8 wlan_user_distance_enum_uint8
Definition wlan_types_base_rom.h:419