Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: NNN50_CE_Test_UDP NNN50_linux_firmware NNN50_SoftAP_HelloWorld NNN50_BLEWIFISensor ... more
m2m_ate_mode.h
00001 /** 00002 * 00003 * \file 00004 * 00005 * \brief WINC ATE Test Driver Interface. 00006 * 00007 * Copyright (c) 2016-2017 Atmel Corporation. All rights reserved. 00008 * 00009 * \asf_license_start 00010 * 00011 * \page License 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions are met: 00015 * 00016 * 1. Redistributions of source code must retain the above copyright notice, 00017 * this list of conditions and the following disclaimer. 00018 * 00019 * 2. Redistributions in binary form must reproduce the above copyright notice, 00020 * this list of conditions and the following disclaimer in the documentation 00021 * and/or other materials provided with the distribution. 00022 * 00023 * 3. The name of Atmel may not be used to endorse or promote products derived 00024 * from this software without specific prior written permission. 00025 * 00026 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00027 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00028 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00029 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00030 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00031 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00032 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00033 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 00034 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00035 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00036 * POSSIBILITY OF SUCH DAMAGE. 00037 * 00038 * \asf_license_stop 00039 * 00040 */ 00041 00042 #ifdef _M2M_ATE_FW_ 00043 00044 #ifndef _M2M_ATE_MODE_H_ 00045 #define _M2M_ATE_MODE_H_ 00046 00047 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 00048 INCLUDES 00049 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 00050 #include "common\include\nm_common.h" 00051 #include "driver\include\m2m_types.h" 00052 00053 00054 /** \defgroup m2m_ate ATE 00055 */ 00056 /**@defgroup ATEDefine Defines 00057 * @ingroup m2m_ate 00058 * @{ 00059 */ 00060 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 00061 MACROS 00062 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 00063 #define M2M_ATE_MAX_NUM_OF_RATES (20) 00064 /*!< 00065 Maximum number of all rates (b,g and n) 00066 */ 00067 #define M2M_ATE_MAX_FRAME_LENGTH (1024) 00068 /*!< Maximum number of length for each frame 00069 */ 00070 #define M2M_ATE_MIN_FRAME_LENGTH (1) 00071 /*!< Minimum number of length for each frame 00072 */ 00073 #define M2M_ATE_SUCCESS (M2M_SUCCESS) 00074 /*!< No Error and operation has been completed successfully. 00075 */ 00076 #define M2M_ATE_ERR_VALIDATE (M2M_ERR_FAIL) 00077 /*!< Error in parameters passed to functions. 00078 */ 00079 #define M2M_ATE_ERR_TX_ALREADY_RUNNING (-1) 00080 /*!< Error in starting a transmission test. Another test is already running and its not allowed to start another ATE test. 00081 */ 00082 #define M2M_ATE_ERR_RX_ALREADY_RUNNING (-2) 00083 /*!< Error in starting a reception test. Another test is already running and its not allowed to start another ATE test. 00084 */ 00085 #define M2M_ATE_ERR_UNHANDLED_CASE (-3) 00086 /*!< Invalid case. 00087 */ 00088 #define M2M_ATE_RX_DISABLE_DA 0x0 00089 /*!< Filter selection for received frames: Disable filtering received frames by the destination address. 00090 */ 00091 #define M2M_ATE_RX_ENABLE_DA 0x1 00092 /*!< Filter selection for received frames: Enable filtering received frames by the destination address. 00093 */ 00094 #define M2M_ATE_RX_DISABLE_SA 0x0 00095 /*!< Filter selection for received frames: Disable filtering received frames by the source address. 00096 */ 00097 #define M2M_ATE_RX_ENABLE_SA 0x1 00098 /*!< Filter selection for received frames: Enable filtering received frames by the source address. 00099 */ 00100 #define M2M_ATE_DISABLE_SELF_MACADDR 0x0 00101 /*!<Disable setting a new mac address through the ATE test application and use the pre-set mac address in the firmware. 00102 */ 00103 #define M2M_ATE_SET_SELF_MACADDR 0x1 00104 /*!<Enable setting a new mac address through the ATE test application and use the pre-set mac address. 00105 */ 00106 #define M2M_ATE_TX_DUTY_MAX_VALUE M2M_ATE_TX_DUTY_1 00107 /*!< The maximum value of duty cycle 00108 */ 00109 #define M2M_ATE_TX_DUTY_MIN_VALUE M2M_ATE_TX_DUTY_10 00110 /*!< The minimum value of duty cycle 00111 */ 00112 //@} 00113 /**@defgroup ATEDataTypes DataTypes 00114 * @ingroup m2m_ate 00115 * @{ 00116 */ 00117 00118 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 00119 DATA TYPES 00120 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 00121 /*! 00122 *@enum tenuM2mAteFwState 00123 *@brief Enumeration used to change ATE firmware states 00124 */ 00125 typedef enum { 00126 M2M_ATE_FW_STATE_STOP = 0x00, 00127 /*!< State to stop ATE firmware 00128 */ 00129 M2M_ATE_FW_STATE_RUN = 0x01, 00130 /*!< State to run ATE firmware 00131 */ 00132 }tenuM2mAteFwState; 00133 00134 /*! 00135 *@enum tenuM2mAteTxRates 00136 *@brief Enumeration used to index the TX rates that can be used during the transmission test. 00137 */ 00138 typedef enum { 00139 M2M_ATE_TX_RATE_1_Mbps_INDEX = 0x00, 00140 M2M_ATE_TX_RATE_2_Mbps_INDEX = 0x01, 00141 M2M_ATE_TX_RATE_55_Mbps_INDEX = 0x02, 00142 M2M_ATE_TX_RATE_11_Mbps_INDEX = 0x03, 00143 /*!< B-Rates 00144 */ 00145 M2M_ATE_TX_RATE_6_Mbps_INDEX = 0x04, 00146 M2M_ATE_TX_RATE_9_Mbps_INDEX = 0x05, 00147 M2M_ATE_TX_RATE_12_Mbps_INDEX = 0x06, 00148 M2M_ATE_TX_RATE_18_Mbps_INDEX = 0x07, 00149 M2M_ATE_TX_RATE_24_Mbps_INDEX = 0x08, 00150 M2M_ATE_TX_RATE_36_Mbps_INDEX = 0x09, 00151 M2M_ATE_TX_RATE_48_Mbps_INDEX = 0x0A, 00152 M2M_ATE_TX_RATE_54_Mbps_INDEX = 0x0B, 00153 /*!< G-Rates 00154 */ 00155 M2M_ATE_TX_RATE_MCS_0_INDEX = 0x0C, 00156 M2M_ATE_TX_RATE_MCS_1_INDEX = 0x0D, 00157 M2M_ATE_TX_RATE_MCS_2_INDEX = 0x0E, 00158 M2M_ATE_TX_RATE_MCS_3_INDEX = 0x0F, 00159 M2M_ATE_TX_RATE_MCS_4_INDEX = 0x10, 00160 M2M_ATE_TX_RATE_MCS_5_INDEX = 0x11, 00161 M2M_ATE_TX_RATE_MCS_6_INDEX = 0x12, 00162 M2M_ATE_TX_RATE_MCS_7_INDEX = 0x13, 00163 /*!< N-Rates 00164 */ 00165 }tenuM2mAteTxIndexOfRates ; 00166 00167 /*! 00168 *@enum tenuM2mAteTxDutyCycle 00169 *@brief Enumeration used to index the TX duty cycle that can be used during the transmission test. 00170 */ 00171 typedef enum { 00172 M2M_ATE_TX_DUTY_1 = 0x01, 00173 M2M_ATE_TX_DUTY_2 = 0x02, 00174 M2M_ATE_TX_DUTY_3 = 0x03, 00175 M2M_ATE_TX_DUTY_4 = 0x04, 00176 M2M_ATE_TX_DUTY_5 = 0x05, 00177 M2M_ATE_TX_DUTY_6 = 0x06, 00178 M2M_ATE_TX_DUTY_7 = 0x07, 00179 M2M_ATE_TX_DUTY_8 = 0x08, 00180 M2M_ATE_TX_DUTY_9 = 0x09, 00181 M2M_ATE_TX_DUTY_10 = 0xA0, 00182 }tenuM2mAteTxDutyCycle; 00183 00184 /*! 00185 *@enum tenuM2mAteTxDpdControl 00186 *@brief Enumeration for the allowed Digital-pre distortion(DPD) control values. 00187 */ 00188 typedef enum { 00189 M2M_ATE_TX_DPD_DYNAMIC = 0x00, 00190 /*!< Dynamic mode indicates that DPD values will be set dynamically from a lookup table pre-set with the DPD coefficents. 00191 */ 00192 M2M_ATE_TX_DPD_BYPASS = 0x01, 00193 /*!< Bypass mode indicates that the DPD control will be bypassed. 00194 */ 00195 M2M_ATE_TX_DPD_ENABLED = 0x02, 00196 /*!< Enabled mode allows the tester to manually set the DPD coefficients. 00197 */ 00198 }tenuM2mAteTxDpdControl; 00199 00200 /*! 00201 *@enum tenuM2mAteTxGainSetting 00202 *@brief Enumeration for the allowed TX gain selection modes. 00203 */ 00204 typedef enum { 00205 M2M_ATE_TX_GAIN_DYNAMIC = 0x00, 00206 /*!< Dynamic mode indicates that Tx gain values for the digital gain,pa and ppa, will be set dynamically from a lookup table based on the Tx_rate configured. 00207 */ 00208 M2M_ATE_TX_GAIN_BYPASS = 0x01, 00209 /*!< Bypass mode indicates that Tx gain configurations will be bypassed. 00210 */ 00211 M2M_ATE_TX_GAIN_FCC = 0x02, 00212 /*!< Using the FCC tx gain configuration indicates that the tx gain values will be used from the FCC flashed table(pre-configured values from a customer). 00213 */ 00214 M2M_ATE_TX_GAIN_TELEC = 0x03, 00215 /*!< Using the TELEC tx gain configuration indicates that the tx gain values will be used from the TELEC flashed table(pre-configured values from a customer). 00216 */ 00217 }tenuM2mAteTxGainSetting; 00218 00219 /*! 00220 *@enum tenuM2mAtePMUSetting 00221 *@brief Used to Enable PMU or disable it 00222 */ 00223 typedef enum { 00224 M2M_ATE_PMU_DISBLE = 0x00, 00225 /*!< Disable using PMU mode 00226 */ 00227 M2M_ATE_PMU_ENABLE = 0x01, 00228 /*!< Enable using PMU mode 00229 */ 00230 }tenuM2mAtePMUSetting; 00231 00232 /*! 00233 *@enum tenuM2mAteTxSource 00234 *@brief Used to define the Tx source, either PHY mode or MAC mode. 00235 */ 00236 typedef enum { 00237 M2M_ATE_TX_SRC_MAC = 0x00, 00238 /*!< When the TX Source is set to MAC, it indicates that the TX frames are manually framed and sent from the MAC layer 00239 */ 00240 M2M_ATE_TX_SRC_PHY = 0x01, 00241 /*!< When the TX source is set to PHY, it indicates that transmission sequence occurs from PHY layer in the form of pulses 00242 */ 00243 }tenuM2mAteTxSource; 00244 00245 /*! 00246 *@enum tenuM2mAteTxMode 00247 *@brief Used to define the mode of PHY TX transmission source: Continuous Wave(CW) or Normal(i.e CW is disabled) TX sequence 00248 */ 00249 typedef enum { 00250 M2M_ATE_TX_MODE_NORM = 0x00, 00251 /*!< When the TX source is set to PHY,normal mode indicates that continous transmission is disabled. 00252 */ 00253 M2M_ATE_TX_MODE_CW = 0x01, 00254 /*!< When the TX source is set to PHY, continous mode indicates that transmission sequences occur back to back in a continous wave from the PHY layer. 00255 */ 00256 }tenuM2mAteTxMode; 00257 00258 /*! 00259 *@enum tenuM2mAteRxPwrMode 00260 *@brief Used to define type of RX mode either high power or low power 00261 */ 00262 typedef enum { 00263 M2M_ATE_RX_PWR_HIGH = 0x00, 00264 /*!< Indicates that receive mode is operating at high power 00265 */ 00266 M2M_ATE_RX_PWR_LOW = 0x01, 00267 /*!< Indicates that receive mode is operating at low power 00268 */ 00269 }tenuM2mAteRxPwrMode; 00270 00271 /*! 00272 *@enum tenuM2mAteChannels 00273 *@brief Available channels for TX and RX in the 2.4GHz spectrum starting at 2412MHz with a 5MHz bandwidth. 00274 */ 00275 typedef enum { 00276 M2M_ATE_CHANNEL_1 = 0x01, 00277 /*!< Channel 1: 2412MHz 00278 */ 00279 M2M_ATE_CHANNEL_2 = 0x02, 00280 /*!< Channel 2: 2417MHz 00281 */ 00282 M2M_ATE_CHANNEL_3 = 0x03, 00283 /*!< Channel 3: 2422MHz 00284 */ 00285 M2M_ATE_CHANNEL_4 = 0x04, 00286 /*!< Channel 4: 2427MHz 00287 */ 00288 M2M_ATE_CHANNEL_5 = 0x05, 00289 /*!< Channel 5: 2432MHz 00290 */ 00291 M2M_ATE_CHANNEL_6 = 0x06, 00292 /*!< Channel 6: 2437MHz 00293 */ 00294 M2M_ATE_CHANNEL_7 = 0x07, 00295 /*!< Channel 7: 2442MHz 00296 */ 00297 M2M_ATE_CHANNEL_8 = 0x08, 00298 /*!< Channel 8: 2447MHz 00299 */ 00300 M2M_ATE_CHANNEL_9 = 0x09, 00301 /*!< Channel 9: 2452MHz 00302 */ 00303 M2M_ATE_CHANNEL_10 = 0x0A, 00304 /*!< Channel 10: 2462MHz 00305 */ 00306 M2M_ATE_CHANNEL_11 = 0x0B, 00307 /*!< Channel 11: 2467MHz 00308 */ 00309 M2M_ATE_CHANNEL_12 = 0x0C, 00310 /*!< Channel 12: 2472MHz 00311 */ 00312 M2M_ATE_CHANNEL_13 = 0x0D, 00313 /*!< Channel 13: 2472MHz 00314 */ 00315 M2M_ATE_CHANNEL_14 = 0x0E, 00316 /*!< Channel 14: 2484MHz 00317 */ 00318 }tenuM2mAteChannels; 00319 00320 /*! 00321 *@struct tstrM2mAteRxStatus 00322 *@brief Used to save statistics for receive(RX) test case 00323 */ 00324 typedef struct { 00325 uint32 num_rx_pkts; 00326 /*!< Number of total RX packets 00327 */ 00328 uint32 num_err_pkts; 00329 /*!< Number of RX failed packets 00330 */ 00331 uint32 num_good_pkts; 00332 /*!< Number of RX packets actually received 00333 */ 00334 } tstrM2mAteRxStatus; 00335 00336 /*! 00337 *@struct tstrM2mAteRxStatus 00338 *@brief Used to save recieve test case configuration 00339 *@see tenuM2mAteRxPwrMode 00340 */ 00341 typedef struct { 00342 uint8 u8RxPwrMode; 00343 /*!< RX power mode review \ref tenuM2mAteRxPwrMode 00344 */ 00345 } tstrM2mAteInit; 00346 00347 /*! 00348 *@struct tstrM2mAteTx 00349 *@brief Used for the transmission(Tx) test configuration. 00350 */ 00351 typedef struct { 00352 uint32 num_frames; 00353 /*!< Number of frames to be sent where maximum number allowed is 4294967295 ul, and ZERO means infinite number of frames 00354 */ 00355 uint32 data_rate; 00356 /*!< Rate to send packets, to select a rate use values from the enumeration \ref tenuM2mAteTxIndexOfRates and pass it to \ref m2m_ate_get_tx_rate 00357 */ 00358 uint8 channel_num; 00359 /*!< Channel number as enumerated at \ref tenuM2mAteChannels 00360 */ 00361 uint8 duty_cycle; 00362 /*!< Duty cycle value between from 1 to 10, where maximum = 1, minimum = 10. As enumerated \ref tenuM2mAteTxDutyCycle 00363 */ 00364 uint16 frame_len; 00365 /*!< Use @ref M2M_ATE_MAX_FRAME_LENGTH (1024) as the maximum value while @ref M2M_ATE_MIN_FRAME_LENGTH (1) is the minimum value 00366 */ 00367 uint8 tx_gain_sel; 00368 /*!< TX gain mode selection value \ref tenuM2mAteTxGainSetting 00369 */ 00370 uint8 dpd_ctrl; 00371 /*!< DPD mode value\ref tenuM2mAteTxDpdControl 00372 */ 00373 uint8 use_pmu; 00374 /*!< This is 0 if PMU is not used otherwise it must be be 1 \ref tenuM2mAtePMUSetting 00375 */ 00376 uint8 phy_burst_tx; 00377 /*!< Source of Burst TX either PHY or MAC \ref tenuM2mAteTxSource 00378 */ 00379 uint8 cw_tx; 00380 /*!< Mode of Phy TX transmission either normal TX sequence or CW(Continuous Wave) TX sequence \ref tenuM2mAteTxMode 00381 */ 00382 uint32 xo_offset_x1000; 00383 /*!< Signed XO offset value in Part Per Million(PPM) multiplied by 1000. 00384 */ 00385 uint8 use_efuse_xo_offset; 00386 /*!< Set to 0 to use the XO offset provided in xo_offset_x1000. Set to 1 to use XO offset programmed on WINC efuse. 00387 */ 00388 uint8 peer_mac_addr[6]; 00389 /*!< Set peer address to send directed frames to a certain address. 00390 */ 00391 } tstrM2mAteTx; 00392 00393 /*! 00394 *@struct tstrM2mAteRx 00395 *@brief Used for the reception(Rx) test configuration. 00396 */ 00397 typedef struct { 00398 uint8 channel_num; 00399 /*!< Channel number \ref tenuM2mAteChannels 00400 */ 00401 uint8 use_pmu; 00402 /*!< This is 0 if PMU is not used otherwise it must be be 1 \ref tenuM2mAtePMUSetting 00403 */ 00404 uint32 xo_offset_x1000; 00405 /*!< Signed XO offset value in PPM (Part Per Million) multiplied by 1000. 00406 */ 00407 uint8 use_efuse_xo_offset; 00408 /*!< Set to 0 to use the XO offset provided in xo_offset_x1000. Set to 1 to use XO offset programmed on WINC efuse. 00409 */ 00410 uint8 self_mac_addr[6]; 00411 /*!< Set to the self mac address required to be overriden. 00412 */ 00413 uint8 peer_mac_addr[6]; 00414 /*!< Set to the source mac address expected to filter frames from. 00415 */ 00416 uint8 mac_filter_en_da; 00417 /*!< Flag set to enable or disable reception with destination address as a filter. Using the following flags \ref M2M_ATE_RX_ENABLE_DA 00418 \ref M2M_ATE_RX_DISABLE_DA 00419 */ 00420 uint8 mac_filter_en_sa; 00421 /*!< Flag set to enable or disable reception with source address as a filter.Using the following flags \ref M2M_ATE_RX_ENABLE_SA 00422 \ref M2M_ATE_RX_DISABLE_SA 00423 */ 00424 uint8 override_self_mac_addr; 00425 /*!< Flag set to enable or disable self mac address feature. Using the following flags \ref M2M_ATE_DISABLE_SELF_MACADDR 00426 \ref M2M_ATE_SET_SELF_MACADDR 00427 */ 00428 } tstrM2mAteRx; 00429 //@} 00430 /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* 00431 FUNCTION PROTOTYPES 00432 *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 00433 #ifdef __cplusplus 00434 extern "C" { 00435 #endif 00436 /**@defgroup ATEFunction Function 00437 * @ingroup m2m_ate 00438 * @{ 00439 */ 00440 /*! 00441 @fn \ 00442 sint8 m2m_ate_init(void); 00443 00444 @brief 00445 This function used to download the ATE firmware from flash and start it. 00446 00447 @return 00448 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00449 @see 00450 m2m_ate_init_param 00451 */ 00452 sint8 m2m_ate_init(void); 00453 00454 00455 /*! 00456 @fn \ 00457 sint8 m2m_ate_init(tstrM2mAteInit *pstrInit); 00458 00459 @brief 00460 This function is used to download and start the ATE firmware with an initialization value 00461 stating the rx mode power \ref tstrM2mAteInit. 00462 @param [in] tstrM2mAteInit * 00463 Pointer to a structure \ref tstrM2mAteInit, defining the initial RX mode value. 00464 @return 00465 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00466 @see 00467 m2m_ate_init 00468 */ 00469 sint8 m2m_ate_init_param(tstrM2mAteInit *pstrInit); 00470 00471 /*! 00472 @fn \ 00473 sint8 m2m_ate_deinit(void); 00474 00475 @brief 00476 De-Initialization of ATE firmware mode 00477 00478 @return 00479 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00480 */ 00481 sint8 m2m_ate_deinit(void); 00482 00483 /*! 00484 @fn \ 00485 sint8 m2m_ate_set_fw_state(uint8); 00486 00487 @brief 00488 This function is used to change the ATE firmware status from running to stopped or vice versa. 00489 00490 @param [in] u8State 00491 Required state of the ATE firmware, one of \ref tenuM2mAteFwState enumeration values. 00492 @return 00493 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00494 @see 00495 m2m_ate_init 00496 */ 00497 sint8 m2m_ate_set_fw_state(uint8); 00498 00499 /*! 00500 @fn \ 00501 sint8 m2m_ate_get_fw_state(uint8); 00502 00503 @brief 00504 This function is used to return the status of ATE firmware. 00505 00506 @return 00507 The function SHALL return the status of ATE firmware, one of \ref tenuM2mAteFwState enumeration values. 00508 @see 00509 m2m_ate_init, m2m_ate_set_fw_state 00510 */ 00511 sint8 m2m_ate_get_fw_state(void); 00512 00513 /*! 00514 @fn \ 00515 uint32 m2m_ate_get_tx_rate(uint8); 00516 00517 @brief 00518 This function is used to return value of TX rate required by application developer. 00519 00520 @param [in] u8Index 00521 Index of the required rate , one of \ref tenuM2mAteTxIndexOfRates enumeration values. 00522 @return 00523 The function SHALL return 0 in case of receiving invalid index, otherwise the selected rate value is returned. 00524 @see 00525 tenuM2mAteTxIndexOfRates 00526 */ 00527 uint32 m2m_ate_get_tx_rate(uint8); 00528 00529 /*! 00530 @fn \ 00531 sint8 m2m_ate_get_tx_status(void); 00532 00533 @brief 00534 This function is used to return the status of TX test case either running or stopped. 00535 00536 @return 00537 The function SHALL return the status of ATE firmware, 1 if TX test case is running or 0 if TX test case has been stopped. 00538 @see 00539 m2m_ate_start_tx, m2m_ate_stop_tx 00540 */ 00541 sint8 m2m_ate_get_tx_status(void); 00542 00543 /*! 00544 @fn \ 00545 sint8 m2m_ate_start_tx(tstrM2mAteTx *) 00546 00547 @brief 00548 This function is used to start the TX test case. 00549 00550 @param [in] strM2mAteTx 00551 Type of \ref tstrM2mAteTx, with the values required to enable TX test case. Application must use \ref m2m_ate_init first. 00552 @return 00553 The function SHALL return 0 for success and a negative value otherwise. 00554 @see 00555 m2m_ate_init, m2m_ate_stop_tx, m2m_ate_get_tx_status 00556 */ 00557 sint8 m2m_ate_start_tx(tstrM2mAteTx *); 00558 00559 /*! 00560 @fn \ 00561 sint8 m2m_ate_stop_tx(void) 00562 00563 @brief 00564 This function is used to stop the TX test case. 00565 00566 @return 00567 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00568 @see 00569 m2m_ate_init, m2m_ate_start_tx, m2m_ate_get_tx_status 00570 */ 00571 sint8 m2m_ate_stop_tx(void); 00572 00573 /*! 00574 @fn \ 00575 sint8 m2m_ate_get_rx_status(uint8); 00576 00577 @brief 00578 This function is used to return the status of RX test case either running or stopped. 00579 00580 @return 00581 The function SHALL return status of ATE firmware, 1 if RX test case is running or 0 when the test case has been stopped. 00582 @see 00583 m2m_ate_start_rx, m2m_ate_stop_rx 00584 */ 00585 sint8 m2m_ate_get_rx_status(void); 00586 00587 /*! 00588 @fn \ 00589 sint8 m2m_ate_start_rx(tstrM2mAteRx *) 00590 00591 @brief 00592 This function is used to start RX test case. 00593 00594 @param [in] strM2mAteRx 00595 Type of \ref tstrM2mAteRx, with the values required to enable RX test case. Application must use \ref m2m_ate_init first. 00596 @return 00597 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00598 @see 00599 m2m_ate_init, m2m_ate_stop_rx, m2m_ate_get_rx_status 00600 */ 00601 sint8 m2m_ate_start_rx(tstrM2mAteRx *); 00602 00603 /*! 00604 @fn \ 00605 sint8 m2m_ate_stop_rx(void) 00606 00607 @brief 00608 This function is used to stop RX test case. 00609 00610 @return 00611 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00612 @see 00613 m2m_ate_init, m2m_ate_start_rx, m2m_ate_get_rx_status 00614 */ 00615 sint8 m2m_ate_stop_rx(void); 00616 00617 /*! 00618 @fn \ 00619 sint8 m2m_ate_read_rx_status(tstrM2mAteRxStatus *) 00620 00621 @brief 00622 This function is used to read RX statistics from the ATE firmware. 00623 00624 @param [out] strM2mAteRxStatus 00625 Type of \ref tstrM2mAteRxStatus used to save statistics of RX test case. Application must use \ref m2m_ate_start_rx first. 00626 @return 00627 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00628 @see 00629 m2m_ate_init, m2m_ate_start_rx 00630 */ 00631 sint8 m2m_ate_read_rx_status(tstrM2mAteRxStatus *); 00632 00633 /*! 00634 @fn \ 00635 sint8 m2m_ate_set_dig_gain(double dGaindB) 00636 00637 @brief 00638 This function is used to set the digital gain value to the HW registers in dB. 00639 00640 @param [in] double dGaindB 00641 The digital gain value required to be set. 00642 @return 00643 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00644 @see 00645 m2m_ate_get_dig_gain, m2m_ate_get_pa_gain,m2m_ate_get_ppa_gain,m2m_ate_get_tot_gain 00646 */ 00647 sint8 m2m_ate_set_dig_gain(double dGaindB); 00648 00649 /*! 00650 @fn \ 00651 sint8 m2m_ate_get_dig_gain(double * dGaindB) 00652 00653 @brief 00654 This function is used to retrieve the digital gain value from the HW registers in dB. 00655 Digital gain is one of the values that are set to calculate the total tx gain value. 00656 00657 @param [out] double * dGaindB 00658 The retrieved digital gain value obtained from HW registers in dB. 00659 @return 00660 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00661 @see 00662 m2m_ate_set_dig_gain, m2m_ate_get_pa_gain,m2m_ate_get_ppa_gain,m2m_ate_get_tot_gain 00663 */ 00664 sint8 m2m_ate_get_dig_gain(double * dGaindB); 00665 00666 /*! 00667 @fn \ 00668 void m2m_ate_set_pa_gain(uint8 gain_db) 00669 00670 @brief 00671 This function is used to set the PA gain (18/15/12/9/6/3/0 only) 00672 00673 @param [in] uint8 gain_db 00674 PA gain level allowed (18/15/12/9/6/3/0 only) 00675 00676 */ 00677 void m2m_ate_set_pa_gain(uint8 gain_db); 00678 /*! 00679 @fn \ 00680 sint8 m2m_ate_get_pa_gain(double *paGaindB) 00681 00682 @brief 00683 This function is used to get the Power Amplifier(PA) gain 00684 00685 @param [out] double *paGaindB 00686 The retrieved PA gain value obtained from HW registers in dB. 00687 @return 00688 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00689 @see 00690 m2m_ate_set_dig_gain, m2m_ate_get_dig_gain,m2m_ate_get_ppa_gain,m2m_ate_get_tot_gain 00691 */ 00692 sint8 m2m_ate_get_pa_gain(double *paGaindB); 00693 00694 /*! 00695 @fn \ 00696 sint8 m2m_ate_get_ppa_gain(double * ppaGaindB) 00697 00698 @brief 00699 This function is used to get the Pre-Power Amplifier(PPA) gain 00700 00701 @param [out] uint32 * ppaGaindB 00702 The retrieved PPA gain value obtained from HW registers in dB. 00703 @return 00704 The function SHALL return 0 for success and a negative value otherwise. 00705 @see 00706 m2m_ate_set_dig_gain, m2m_ate_get_dig_gain,m2m_ate_get_pa_gain,m2m_ate_get_tot_gain 00707 */ 00708 sint8 m2m_ate_get_ppa_gain(double * ppaGaindB); 00709 00710 /*! 00711 @fn \ 00712 sint8 m2m_ate_get_tot_gain(double * totGaindB) 00713 00714 @brief 00715 This function is used to calculate the total tx gain value 00716 00717 @param [out] double * totGaindB 00718 The retrieved total gain value obtained from calculations made based on the digital gain, PA and PPA gain values. 00719 @return 00720 The function SHALL return @ref M2M_SUCCESS for success and a negative value otherwise. 00721 @see 00722 m2m_ate_set_dig_gain, m2m_ate_get_dig_gain,m2m_ate_get_pa_gain,m2m_ate_get_ppa_gain 00723 */ 00724 sint8 m2m_ate_get_tot_gain(double * totGaindB); 00725 //@} 00726 00727 #ifdef __cplusplus 00728 } 00729 #endif 00730 00731 #endif /* _M2M_CONFIG_MODE_H_ */ 00732 00733 #endif //_M2M_ATE_FW_ 00734
Generated on Wed Jul 13 2022 16:32:37 by
1.7.2