hc
2023-11-06 15ade055295d13f95d49e3d99b09f3bbfb4a43e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *                                        
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
 *
 *
 ******************************************************************************/
#ifndef __INC_PHYDM_API_H_8822B__
#define __INC_PHYDM_API_H_8822B__
 
#if (RTL8822B_SUPPORT == 1)
 
#define    PHY_CONFIG_VERSION_8822B            "27.5.31"    /*2016.08.01     (HW user guide version: R27, SW user guide version: R05, Modification: R31)*/
 
#define    INVALID_RF_DATA                    0xffffffff
#define    INVALID_TXAGC_DATA                0xff
 
#define    config_phydm_read_rf_check_8822b(data)            (data != INVALID_RF_DATA)
#define    config_phydm_read_txagc_check_8822b(data)        (data != INVALID_TXAGC_DATA)
 
u4Byte
config_phydm_read_rf_reg_8822b(
   IN    PDM_ODM_T                pDM_Odm,
   IN    ODM_RF_RADIO_PATH_E        RFPath,
   IN    u4Byte                    RegAddr,
   IN    u4Byte                    BitMask
   );
 
BOOLEAN
config_phydm_write_rf_reg_8822b(
   IN    PDM_ODM_T                pDM_Odm,
   IN    ODM_RF_RADIO_PATH_E        RFPath,
   IN    u4Byte                    RegAddr,
   IN    u4Byte                    BitMask,
   IN    u4Byte                    Data
   );
 
BOOLEAN
config_phydm_write_txagc_8822b(
   IN    PDM_ODM_T                pDM_Odm,
   IN    u4Byte                    PowerIndex,
   IN    ODM_RF_RADIO_PATH_E        Path,    
   IN    u1Byte                    HwRate
   );
 
u1Byte
config_phydm_read_txagc_8822b(
   IN    PDM_ODM_T                pDM_Odm,
   IN    ODM_RF_RADIO_PATH_E        Path,
   IN    u1Byte                    HwRate
   );
 
BOOLEAN
config_phydm_switch_band_8822b(    
   IN    PDM_ODM_T                pDM_Odm,
   IN    u1Byte                    central_ch
   );
 
BOOLEAN
config_phydm_switch_channel_8822b(    
   IN    PDM_ODM_T                pDM_Odm,
   IN    u1Byte                    central_ch
   );
 
BOOLEAN
config_phydm_switch_bandwidth_8822b(    
   IN    PDM_ODM_T                pDM_Odm,
   IN    u1Byte                    primary_ch_idx,
   IN    ODM_BW_E                bandwidth
   );
 
BOOLEAN
config_phydm_switch_channel_bw_8822b(    
   IN    PDM_ODM_T                pDM_Odm,
   IN    u1Byte                    central_ch,
   IN    u1Byte                    primary_ch_idx,
   IN    ODM_BW_E                bandwidth
   );
 
BOOLEAN
config_phydm_trx_mode_8822b(
   IN    PDM_ODM_T                pDM_Odm,
   IN    ODM_RF_PATH_E            TxPath,
   IN    ODM_RF_PATH_E            RxPath,
   IN    BOOLEAN                    bTx2Path
   );
 
BOOLEAN
config_phydm_parameter_init(
   IN    PDM_ODM_T                pDM_Odm,
   IN    ODM_PARAMETER_INIT_E    type
   );
 
 
/* ======================================================================== */
/* These following functions can be used for PHY DM only*/
 
BOOLEAN
phydm_write_txagc_1byte_8822b(
   IN    PDM_ODM_T                pDM_Odm,
   IN    u4Byte                    PowerIndex,
   IN    ODM_RF_RADIO_PATH_E        Path,    
   IN    u1Byte                    HwRate
   );
 
VOID
phydm_init_hw_info_by_rfe_type_8822b(
   IN    PDM_ODM_T                pDM_Odm
   );
 
s4Byte
phydm_get_condition_number_8822B(
   IN    PDM_ODM_T                pDM_Odm
   );
 
/* ======================================================================== */
 
#endif    /* RTL8822B_SUPPORT == 1 */
#endif    /*  __INC_PHYDM_API_H_8822B__ */