Files
kunlun/ftm/inc/iot_pt_rf_func.h
2024-09-28 14:24:04 +08:00

88 lines
2.8 KiB
C

/****************************************************************************
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
be copied by any method or incorporated into another program without
the express written consent of Aerospace C.Power. This Information or any portion
thereof remains the property of Aerospace C.Power. The Information contained herein
is believed to be accurate and Aerospace C.Power assumes no responsibility or
liability for its use in any way and conveys no license or title under
any patent or copyright and makes no representation or warranty that this
Information is free from patent or copyright infringement.
****************************************************************************/
#ifndef __IOT_PT_RF_FUNC_H
#define __IOT_PT_RF_FUNC_H
#include "iot_ftm_msg.h"
#ifdef __cplusplus
extern "C" {
#endif
/* define the default option used by golden */
#define MP_RF_GOLDEN_DEF_OPTION RF_OPTION_2
/* define the default channel used by golden */
#define MP_RF_GOLDEN_DEF_CHANNEL 1
/**
* @brief mp_rf_dut_test_phy_cfg() - phy config.
* @param option:
* @param channel:
* @retval: cfg result, see - ERR_XXX.
*/
uint32_t mp_rf_dut_test_phy_cfg(uint8_t option, uint8_t channel);
/**
* @brief mp_rf_dut_test_case_handle() - dut rf mp test handle func.
* @param cmd: pointer to command info massage.
* @param rsp_hdr: return the filled response message.
* @param len: return len the filled response message.
* @retval: calibration status, see - IOT_BRM_ONESHOT_CALIBRATE_XXX.
*/
void mp_rf_dut_test_case_handle(iot_ftm_mp_rf_cmd_hdr_t *cmd,
iot_ftm_mp_rf_rsp_hdr_t *rsp_hdr, uint8_t *len);
/**
* @brief mp_rf_golden_unit_main() - golden rf mp test handle func.
* @param option: config set option.
* @param channel: config channel.
* @retval: 0 -- for success case, otherwise -- error code.
*/
void mp_rf_golden_unit_main(uint32_t option, uint32_t channel);
/**
* @brief mp_rf_dut_cal_cfg() - configure golden measurement mode through DUT.
* @param cfg: pointer to measurement configuration info.
* @retval: NULL.
*/
uint8_t mp_rf_dut_cal_cfg(iot_ftm_mp_rf_cal_meas_cfg_t *cfg);
/**
* @brief mp_rf_dut_cal_reg_update() - update dut cal register request.
* @param cal_update: request info.
*/
void mp_rf_dut_cal_reg_update(iot_ftm_mp_rf_tx_cal_update_t *cal_update);
/**
* @brief mp_rf_dut_cal_meas_pwr() - make GOLDEN measure power through DUT
* request.
* @param req: request info.
* @param rsp: measurement result response..
*/
void mp_rf_dut_cal_meas_pwr(iot_ftm_mp_rf_cal_meas_req_t *req,
iot_ftm_mp_rf_cal_meas_rsp_t *rsp);
/**
* @brief mp_rf_clear_rf_common() - clear rf communication
*/
void mp_rf_clear_rf_common();
#ifdef __cplusplus
}
#endif
#endif /* __IOT_PT_RF_FUNC_H */