📄 meta.h
字号:
void __stdcall META_QueryTestCase(META_UT_TestCaseID_T **ppTestCase, unsigned int *pTestCaseCount);
void __stdcall META_UnitTest(const unsigned int *p_TestCaseID_Array, unsigned int TestCaseCount);
//-----------------------------------------------------//
// META General: exported function definition //
//-----------------------------------------------------//
#define FT_MT_UNKNOWN 0
#define FT_MT6305 1
#define FT_MT6318 2
typedef struct {
unsigned char id;
} PMIC_ID;
typedef struct {
unsigned int pcl;
} RF_GetITC_PCL;
// General
void __stdcall META_GetDLLVer(unsigned int *major_ver, unsigned int *minor_ver, unsigned int *build_num, unsigned int *patch_num);
void __stdcall META_GetDLLInfo(const char **pp_version, const char **pp_release_type, const char **pp_build_date, const char **pp_load_path);
void __stdcall META_Cancel(const short token);
void __stdcall META_Cancel_r(const int meta_handle, const short token);
void __stdcall META_CancelAllBlockingCall(void);
void __stdcall META_CancelAllBlockingCall_r(const int meta_handle);
META_RESULT __stdcall META_QueryIfFunctionSupportedByTarget(unsigned int ms_timeout, const char *query_func_name);
META_RESULT __stdcall META_QueryIfFunctionSupportedByTarget_r(const int meta_handle, unsigned int ms_timeout, const char *query_func_name);
META_RESULT __stdcall META_QueryIfTargetSupportISP(unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetSupportISP_r(const int meta_handle, unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetSupportAcoustic16level(unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetSupportAcoustic16level_r(const int meta_handle, unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetSupportAudioParam45Tap(unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetSupportAudioParam45Tap_r(const int meta_handle, unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetIsLowCostSingleBankFlash(unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetIsLowCostSingleBankFlash_r(const int meta_handle, unsigned int ms_timeout);
META_RESULT __stdcall META_QueryPMICID(unsigned int ms_timeout, PMIC_ID *cnf);
META_RESULT __stdcall META_QueryPMICID_r(const int meta_handle, unsigned int ms_timeout, PMIC_ID *cnf);
META_RESULT __stdcall META_BTPowerOn(unsigned int ms_timeout);
META_RESULT __stdcall META_BTPowerOn_r(const int meta_handle, unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetSupportWifiALC(unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetSupportWifiALC_r(const int meta_handle, unsigned int ms_timeout);
META_RESULT __stdcall META_QueryITC_PCL(unsigned int ms_timeout, RF_GetITC_PCL *cnf);
META_RESULT __stdcall META_QueryITC_PCL_r(const int meta_handle, unsigned int ms_timeout, RF_GetITC_PCL *cnf);
META_RESULT __stdcall META_QueryIfTargetSupportDRC(unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfTargetSupportDRC_r(const int meta_handle, unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfBTPowerOn(unsigned int ms_timeout);
META_RESULT __stdcall META_QueryIfBTPowerOn_r(const int meta_handle, unsigned int ms_timeout);
//-----------------------------------------------------//
// UTILITY--ENABLE WATCHDOG //
//-----------------------------------------------------//
#define GPIO_DEV_LED_MAINLCD 0
//#define GPIO_DEV_LED_SUBLCD 1
typedef struct {
unsigned int ms_timeout_interval;
} FtWatchDog;
typedef struct {
unsigned char led_light_level;
} FtLEDLevel;
typedef struct {
unsigned char lcd_type;
unsigned char lcd_light_level;
} FtLCDLevel;
typedef struct {
unsigned char onoff;
} FtVibratorOnOff;
typedef struct {
unsigned char m_rtc_sec; /* seconds after the minute - [0,59] */
unsigned char m_rtc_min; /* minutes after the hour - [0,59] */
unsigned char m_rtc_hour; /* hours after the midnight - [0,23] */
unsigned char m_rtc_day; /* day of the month - [1,31] */
unsigned char m_rtc_mon; /* months - [1,12] */
unsigned char m_rtc_wday; /* days in a week - [1,7] */
unsigned char m_rtc_year;
} T_Rtc;
META_RESULT __stdcall META_EnableWatchDogTimer(unsigned int ms_timeout, FtWatchDog *req);
META_RESULT __stdcall META_EnableWatchDogTimer_r(const int meta_handle, unsigned int ms_timeout, FtWatchDog *req);
META_RESULT __stdcall META_SetLEDLightLevel(unsigned int ms_timeout, FtLEDLevel *req);
META_RESULT __stdcall META_SetLEDLightLevel_r(const int meta_handle, unsigned int ms_timeout, FtLEDLevel *req);
META_RESULT __stdcall META_SetVibratorOnOff(unsigned int ms_timeout, FtVibratorOnOff *req);
META_RESULT __stdcall META_SetVibratorOnOff_r(const int meta_handle, unsigned int ms_timeout, FtVibratorOnOff *req);
META_RESULT __stdcall META_QueryLocalTime(unsigned int ms_timeout, T_Rtc *cnf);
META_RESULT __stdcall META_QueryLocalTime_r(const int meta_handle, unsigned int ms_timeout, T_Rtc *cnf);
META_RESULT __stdcall META_SetMainSubLCDLightLevel(unsigned int ms_timeout, FtLCDLevel *req);
META_RESULT __stdcall META_SetMainSubLCDLightLevel_r(const int meta_handle, unsigned int ms_timeout, FtLCDLevel *req);
const char * __stdcall META_GetErrorString(META_RESULT ErrCode);
const char * __stdcall META_BaudrateEnumToName(META_COMM_BAUDRATE baudrate);
// Initialization
META_RESULT __stdcall META_GetAvailableHandle(int *p_meta_handle);
META_RESULT __stdcall META_Init(const META_Error_CallBack cb);
META_RESULT __stdcall META_Init_r(const int meta_handle, const META_Error_CallBack cb);
META_RESULT __stdcall META_SetSysTraceCallback(const META_SysTrace_CallBack sys_cb);
META_RESULT __stdcall META_SetSysTraceCallback_r(const int meta_handle, const META_SysTrace_CallBack sys_cb);
void __stdcall META_Deinit(void);
void __stdcall META_Deinit_r(int *p_meta_handle);
// connect with target
META_RESULT __stdcall META_ConnectWithTarget(const META_Connect_Req *req, int *p_bootstop, META_Connect_Report *p_report);
META_RESULT __stdcall META_ConnectWithTarget_r(const int meta_handle, const META_Connect_Req *req, int *p_bootstop, META_Connect_Report *p_report);
// dsiconnect and shutdown target
META_RESULT __stdcall META_DisconnectWithTarget(void);
META_RESULT __stdcall META_DisconnectWithTarget_r(const int meta_handle);
// connect with target when target already in meta mode
META_RESULT __stdcall META_ConnectInMetaMode(const META_ConnectInMETA_Req *req, int *p_bootstop, META_ConnectInMETA_Report *p_report);
META_RESULT __stdcall META_ConnectInMetaMode_r(const int meta_handle, const META_ConnectInMETA_Req *req, int *p_bootstop, META_ConnectInMETA_Report *p_report);
// dsiconnect without shutdown target
META_RESULT __stdcall META_DisconnectInMetaMode(void);
META_RESULT __stdcall META_DisconnectInMetaMode_r(const int meta_handle);
// Get target S/W, H/W and Melody version
META_RESULT __stdcall META_GetTargetVerInfo(const META_GET_VERSION_INFO_CNF cb, short *token, void *usrData);
META_RESULT __stdcall META_GetTargetVerInfo_r(const int meta_handle, const META_GET_VERSION_INFO_CNF cb, short *token, void *usrData);
// Shutdown target
META_RESULT __stdcall META_ShutDownTarget(void);
META_RESULT __stdcall META_ShutDownTarget_r(const int meta_handle);
// ***** Expired Functions -- BEGIN ***** //
// these functions are expired, we encourage you to use META_ConnectWithTarget and META_DisconnectWithTarget
META_RESULT __stdcall META_COMM_Set_Baudrate(const META_COMM_BAUDRATE baudrate);
META_RESULT __stdcall META_COMM_Set_Baudrate_r(const int meta_handle, const META_COMM_BAUDRATE baudrate);
META_RESULT __stdcall META_COMM_Start(const int comm_port, const META_FLOWCTRL flowctrl);
META_RESULT __stdcall META_COMM_Start_r(const int meta_handle, const int comm_port, const META_FLOWCTRL flowctrl);
META_RESULT __stdcall META_COMM_Stop(void);
META_RESULT __stdcall META_COMM_Stop_r(const int meta_handle);
META_RESULT __stdcall META_WaitForTargetReady(unsigned int ms_waiting_time, unsigned int request_count);
META_RESULT __stdcall META_WaitForTargetReady_r(const int meta_handle, unsigned int ms_waiting_time, unsigned int request_count);
META_RESULT __stdcall META_GetTargetRequiredMetaVer(unsigned int *p_meta_ver_required_by_target);
META_RESULT __stdcall META_GetTargetRequiredMetaVer_r(const int meta_handle, unsigned int *p_meta_ver_required_by_target);
// ***** Expired Functions -- END ***** //
//--------------------------------------------------------------------------//
// 3G RF Testing //
//--------------------------------------------------------------------------//
//-----------------------------------------------------//
// 3G RF Testing: data structure definition //
//-----------------------------------------------------//
typedef enum {
URF_TEST_CMD_TXACCESS = 0
,URF_TEST_CMD_STOP
,URF_TEST_CMD_TX_DPCH
,URF_TEST_CMD_RX_DPCH
,URF_TEST_CMD_RSSI
,URF_TEST_CMD_RSCP
,URF_TEST_CMD_END
}URfTestCmdType;
typedef struct {
short uarfcn; //kal_int16
short psc; //kal_int16
unsigned short signature; //kal_uint16
unsigned char pa_mode; //unsigned char
char init_power; //kal_int8
unsigned char power_step; //kal_uint8
unsigned char max_retrans; //kal_uint8
}URfTestCmdTxAccess;
typedef struct
{
short dl_freq;
short ul_freq;
short psc; /* 0~511. */
unsigned int sc_code; /* Scrambling code #. 0 ~ 16777215 */
unsigned char pa_mode;
unsigned short idx;
unsigned short afc_dac;
unsigned char dpcch_pwr;
unsigned char dpdch_pwr;
/* Below for UL1D_RF_Meta_SetTxInfo. */
bool no_loop_ctrl;
/* Below for setPaApcDac. */
unsigned char rf_band;
unsigned short pa_dac;
unsigned short apc_dac;
} URfTestCmdTxDPCh; //Anthony
typedef struct
{
short dl_freq;
short psc; /* 0~511. */
unsigned char ssc; /* 0~15. */
short ovsf; /* 0~sf-1. */
unsigned short afc_dac;
/* Below for RF_SetBBRxParams. */
bool hwAGC;
unsigned char mode; /* 0: mode0, 1: mode1. */
short gain; /* mode0. */
unsigned char LNAmode; /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
unsigned short pga; /* mode1. */
} URfTestCmdRxDPCh;
#define MAX_FREQ_LIST 36
typedef struct
{
unsigned char num_freq;
short dl_freq[ MAX_FREQ_LIST ];
/* Below for RF_SetBBRxParams. */
bool hwAGC;
unsigned char mode; /* 0: mode0, 1: mode1. */
short gain; /* mode0. */
unsigned char LNAmode; /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
unsigned short pga; /* mode1. */
} URfTestCmdRSSI;
typedef struct
{
bool pscan_before_cell_search; /* True if UL1TST needs power scan before cell search/RSCP. */
short dl_freq; /* Specific dl_freq to do cell search. Valid if pscan_before_cell_search=F. */
unsigned char sample_num_per_cell;
bool read_sfn; /* True if we need to do SFN measurement for the found cell. */
/* Below for RF_SetBBRxParams. */
bool hwAGC;
unsigned char mode; /* 0: mode0, 1: mode1. */
short gain; /* mode0. */
unsigned char LNAmode; /* mode1. 0: LNA low, 1: LNA mid, 2: LNA high. */
unsigned short pga; /* mode1. */
} URfTestCmdRSCP;
typedef union {
URfTestCmdTxAccess txaccess;
URfTestCmdTxDPCh txdpch; //Anthony
URfTestCmdRxDPCh rxdpch;
URfTestCmdRSSI rssi;
URfTestCmdRSCP rscp;
}URfTestCmdParam;
typedef struct
{
bool ok;
unsigned char num_freq;
short dl_freq[ MAX_FREQ_LIST ];
int rssi[ MAX_FREQ_LIST ];
} URfTestResultRSSI;
typedef struct
{
unsigned short psc; /* Primary scrambling code */
int tm; /* Cell frame boundary offset to LST */
short off; /* Cell frame number offset to LST */
bool sttd; /* True for STTD used. */
unsigned char sample_num;
unsigned char rscp_sum;
} UL1TST_cpich_result_T;
#define MAX_NUM_MEAS_CELL 32
typedef struct
{
bool ok;
unsigned char num_cell;
UL1TST_cpich_result_T cpich_result[ MAX_NUM_MEAS_CELL ];
} URfTestResultRSCP;
typedef struct
{
bool ok;
unsigned int ber; /* Spec requirement=10^-3. We will count 10^5 frames(100 times spec requirement) for BER calculation. Only count for the only TRCh for DPDCh. */
} URfTestResultRxDPCh;
typedef union {
bool ok; //kal_bool
URfTestResultRSSI rssi;
URfTestResultRSCP rscp;
URfTestResultRxDPCh rx_dpch;
}URfTestResultParam;
//-----------------------------------------------------//
// 3G RF Testing: function definition //
//-----------------------------------------------------//
META_RESULT __stdcall META_3Grf_TxAccess(unsigned int ms_timeout, URfTestCmdTxAccess *req, URfTestResultParam *cnf);
META_RESULT __stdcall META_3Grf_TxAccess_r(const int meta_handle, unsigned int ms_timeout, URfTestCmdTxAccess *req, URfTestResultParam *cnf);
META_RESULT __stdcall META_3Grf_TestStop(unsigned int ms_timeout, URfTestResultParam *cnf);
META_RESULT __stdcall META_3Grf_TestStop_r(const int meta_handle, unsigned int ms_timeout, URfTestResultParam *cnf);
META_RESULT __stdcall META_3Grf_TxDpch(unsigned int ms_timeout, URfTestCmdTxDPCh *req, URfTestResultParam *cnf);
META_RESULT __stdcall META_3Grf_TxDpch_r(const int meta_handle, unsigned int ms_timeout, URfTestCmdTxDPCh *req, URfTestResultParam *cnf);
META_RESULT __stdcall META_3Grf_RxDpch(unsigned int ms_timeout, URfTestCmdRxDPCh *req, URfTestResultRxDPCh *cnf);
META_RESULT __stdcall META_3Grf_RxDpch_r(const int meta_handle, unsigned int ms_timeout, URfTestCmdRxDPCh *req, URfTestResultRxDPCh *cnf);
META_RESULT __stdcall META_3Grf_Rssi(unsigned int ms_timeout, URfTestCmdRSSI *req, URfTestResultRSSI *cnf);
META_RESULT __stdcall META_3Grf_Rssi_r(const int meta_handle, unsigned int ms_timeout, URfTestCmdRSSI *req, URfTestResultRSSI *cnf);
META_RESULT __stdcall META_3Grf_Rscp(unsigned int ms_timeout, URfTestCmdRSCP *req, URfTestResultRSCP *cnf);
META_RESULT __stdcall META_3Grf_Rscp_r(const int meta_handle, unsigned int ms_timeout, URfTestCmdRSCP *req, URfTestResultRSCP *cnf);
//--------------------------------------------------------------------------//
// RF Testing //
//--------------------------------------------------------------------------//
//-----------------------------------------------------//
// RF Testing: data structure definition //
//-----------------------------------------------------//
typedef short ARFCN;
typedef short Gain;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -