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

67 lines
2.3 KiB
C
Executable File

/****************************************************************************
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_FTM_CASE_H
#define IOT_FTM_CASE_H
#include "iot_pkt_api.h"
#ifdef __cplusplus
extern "C" {
#endif
#define FTM_MSG_HEADER 6
/* tx data len */
#define FTM_TX_DATA_LEN 65
/* default 5hwq, 5*3 + 1 */
#define FTM_TX_HWQCFG_LEN 16
/* define ftm hwq is debug mode or schedule mode */
#define FTM_HWQ_IS_DEBUG_MODE 0
/* work in plc mode */
#define FTM_INIT_PLC_MODE 1
/* work in rf mode */
#define FTM_INIT_RF_MODE 2
/* work in plc and rf mode */
#define FTM_INIT_PLC_RF_MODE (FTM_INIT_RF_MODE | FTM_INIT_PLC_MODE)
/* work mode */
#define FTM_INIT_WORK_MODE FTM_INIT_PLC_MODE
/* high 4bit */
#define FTM_INIT_HIGH_4BIT 4
#define FTM_INIT_MODE_TX 1
#define FTM_INIT_MODE_RX 2
#define FTM_INIT_MODE_TX_RX (FTM_INIT_MODE_TX | FTM_INIT_MODE_RX)
#define FTM_INIT_MODE FTM_INIT_MODE_RX
/**
* @brief ftm_cfg_init_mode() -ftm_cfg_init_mode
* @param uint32_t ftm_init_mode -mode sel
* ftm mode auto tx and rx sts
* FTM_INIT_MODE_TX : ftm tx enable
* FTM_INIT_MODE_RX : ftm rx enable
* FTM_INIT_MODE_TX_RX : enable both tx and rx for ftm init
* @return 0
*/
uint32_t ftm_cfg_init_mode(uint32_t ftm_init_mode);
#ifdef __cplusplus
}
#endif
#endif