1 /** 2 * @file hi_wifi_mfg_test_if.h 3 * 4 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 * Description: header file for wifi manufacturing test interference.CNcomment:描述:WiFi 产测接口头文件CNend\n 18 */ 19 20 /** 21 * @defgroup hi_wifi_mfg_test_if 22 */ 23 /** 24 * @defgroup hi_wifi_mfg_test_if Basic Settings 25 * @ingroup hi_wifi 26 */ 27 28 #ifndef __HI_WIFI_MFG_TEST_IF_H__ 29 #define __HI_WIFI_MFG_TEST_IF_H__ 30 31 #ifdef __cplusplus 32 #if __cplusplus 33 extern "C" { 34 #endif 35 #endif 36 37 typedef enum { 38 HISI_AT_AL_TX, 39 HISI_AT_AL_RX, 40 HISI_AT_RX_INFO, 41 HISI_AT_SET_COUNTRY, 42 HISI_AT_GET_COUNTRY, 43 HISI_AT_SET_WLAN0_BW, 44 HISI_AT_SET_AP0_BW, 45 HISI_AT_SET_MESH0_BW, 46 HISI_AT_GET_WLAN0_MESHINFO, 47 HISI_AT_GET_MESH0_MESHINFO, 48 HISI_AT_SET_TPC, 49 HISI_AT_SET_TRC, 50 HISI_AT_SET_RATE, 51 HISI_AT_SET_ARLOG, 52 HISI_AT_GET_VAP_INFO, 53 HISI_AT_GET_USR_INFO, 54 55 HISI_AT_TYPE_BUTT 56 }hisi_at_type_enum; 57 58 /** 59 * @ingroup hi_wifi_mfg_test_if 60 * @brief Set cal rate power.CNcomment:对不同协议场景、不用速率分别做功率补偿CNend 61 * 62 * @par Description: 63 * Set cal band power.CNcomment:对不同协议场景、不用速率分别做功率补偿CNend 64 * 65 * @attention NULL 66 * @param protol [IN] Type #unsigned char protol.CNcomment:协议序号CNend 67 * @param rate [IN] Type #unsigned char rate.CNcomment:速率CNend 68 * @param val [IN] Type #int power val.CNcomment:补偿值CNend 69 * 70 * @retval #HI_ERR_SUCCESS Excute successfully 71 * @retval #Other Error code 72 * @par Dependency: 73 * @li hi_wifi_mfg_test_if.h: WiFi mfg_test 74 * @see NULL 75 */ 76 unsigned int wal_set_cal_rate_power(unsigned char protol, unsigned char rate, int val); 77 78 /** 79 * @ingroup hi_wifi_mfg_test_if 80 * @brief Set cal freq.CNcomment:进行常温频偏功率补偿CNend 81 * 82 * @par Description: 83 * Set cal freq.CNcomment:进行常温频偏功率补偿CNend 84 * 85 * @attention NULL 86 * @param freq_offset [IN] Type #int freq offset.CNcomment:补偿值CNend 87 * 88 * @retval #HI_ERR_SUCCESS Excute successfully 89 * @retval #Other Error code 90 * @par Dependency: 91 * @li hi_wifi_mfg_test_if.h: WiFi mfg_test 92 * @see NULL 93 */ 94 unsigned int wal_set_cal_freq(int freq_offset); 95 96 #ifdef _PRE_WLAN_FEATURE_MFG_TEST 97 /** 98 * @ingroup hi_wifi_mfg_test_if 99 * @brief Set cal band power.CNcomment:设置各band平均功率补偿CNend 100 * 101 * @par Description: 102 * Set cal band power.CNcomment:设置各band平均功率补偿CNend 103 * 104 * @attention NULL 105 * @param band_num [IN] Type #unsigned char band num.CNcomment:band序号CNend 106 * @param offset [IN] Type #int power offset.CNcomment:功率补偿值CNend 107 * 108 * @retval #HI_ERR_SUCCESS Excute successfully 109 * @retval #Other Error code 110 * @par Dependency: 111 * @li hi_wifi_mfg_test_if.h: WiFi mfg_test 112 * @see NULL 113 */ 114 unsigned int wal_set_cal_band_power(unsigned char band_num, int offset); 115 116 /** 117 * @ingroup hi_wifi_mfg_test_if 118 * @brief set macefuse mac addr.CNcomment:将MAC地址写入efuse或nvCNend 119 * 120 * @par Description: 121 * set macefuse mac addr.CNcomment:将MAC地址写入efuse或nvCNend 122 * 123 * @attention NULL 124 * @param mac_addr [IN] Type #const char * mac addr.CNcomment:mac地址CNend 125 * @param type [IN] Type #unsigned char type.CNcomment:写入类型,0:efuse,1:nvCNend 126 * 127 * @retval #HI_ERR_SUCCESS Excute successfully 128 * @retval #Other Error code 129 * @par Dependency: 130 * @li hi_wifi_mfg_test_if.h: WiFi mfg_test 131 * @see NULL 132 */ 133 unsigned int wal_set_customer_mac(const char *mac_addr, unsigned char type); 134 135 /** 136 * @ingroup hi_wifi_mfg_test_if 137 * @brief get macefuse mac addr.CNcomment:获取efuse中的MAC地址CNend 138 * 139 * @par Description: 140 * get macefuse mac addr.CNcomment:获取efuse中的MAC地址CNend 141 * 142 * @attention NULL 143 * @param NULL 144 * 145 * @retval #HI_ERR_SUCCESS Excute successfully 146 * @retval #Other Error code 147 * @par Dependency: 148 * @li hi_wifi_mfg_test_if.h: WiFi mfg_test 149 * @see NULL 150 */ 151 unsigned int wal_get_customer_mac(void); 152 153 /** 154 * @ingroup hi_wifi_mfg_test_if 155 * @brief write data into efuse.CNcomment:将校准值写入efuseCNend 156 * 157 * @par Description: 158 * write data into efuse.CNcomment:将校准值写入efuseCNend 159 * 160 * @attention NULL 161 * @param type [IN] Type #unsigned char type.CNcomment:写入类型,0:efuse,1:nvCNend 162 * 163 * @retval #HI_ERR_SUCCESS Excute successfully 164 * @retval #Other Error code 165 * @par Dependency: 166 * @li hi_wifi_mfg_test_if.h: WiFi mfg_test 167 * @see NULL 168 */ 169 unsigned int wal_set_dataefuse(hi_u32 type); 170 #endif 171 172 /** 173 * @ingroup hi_wifi_mfg_test_if 174 * @brief get cur cal data.CNcomment:获取当前产测校准值CNend 175 * 176 * @par Description: 177 * get cur cal data.CNcomment:获取当前产测校准值CNend 178 * 179 * @attention NULL 180 * @param NULL 181 * 182 * @retval #HI_ERR_SUCCESS Excute successfully 183 * @retval #Other Error code 184 * @par Dependency: 185 * @li hi_wifi_mfg_test_if.h: WiFi mfg_test 186 * @see NULL 187 */ 188 unsigned int wal_get_cal_data(void); 189 190 #if defined(CONFIG_FACTORY_TEST_MODE) || defined(_PRE_WLAN_QUICK_SEND) 191 /** 192 * @ingroup hi_wifi_mfg_test_if 193 * @brief add cfg vap.CNcomment:添加配置vapCNend 194 * 195 * @par Description: 196 * add cfg vap.CNcomment:添加配置vapCNend 197 * 198 * @attention NULL 199 * @param NULL 200 * 201 * @retval #HI_ERR_SUCCESS Excute successfully 202 * @retval #Other Error code 203 * @par Dependency: 204 * @li hi_wifi_mfg_test_if.h: WiFi mfg_test 205 * @see NULL 206 */ 207 unsigned int wal_add_cfg_vap(void); 208 #endif 209 210 /** 211 * @ingroup hi_wifi_mfg_test_if 212 * @brief always rx/tx interference function.CNcomment:常发常收等接口函数CNend 213 * 214 * @par Description: 215 * always rx/tx interference function.CNcomment:常发常收等接口函数CNend 216 * 217 * @attention NULL 218 * @param argc [IN] Type #int argc.CNcomment:命令参数个数CNend 219 * @param argv [IN] Type #const char *argv.CNcomment:命令各参数对应的字符串数组CNend 220 * @param cmd_type [IN] Type #unsigned int cmd_type.CNcomment:命令类型CNend 221 * 222 * @retval #HI_ERR_SUCCESS Excute successfully 223 * @retval #Other Error code 224 * @par Dependency: 225 * @li hi_wifi_mfg_test_if.h: WiFi mfg_test 226 * @see NULL 227 */ 228 unsigned int hi_wifi_at_start(int argc, const char *argv[], unsigned int cmd_type); 229 230 #ifdef __cplusplus 231 #if __cplusplus 232 } 233 #endif 234 #endif 235 236 #endif 237