⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 meta.h

📁 MTK平台的下载程序源代码,极具参考价值,可修改支持其它芯片的FLASH
💻 H
📖 第 1 页 / 共 5 页
字号:
} MS_CAPABILITY_E;

typedef struct {
	unsigned int	GSM400;			// Zero: not support, Non-zero: support 
	unsigned int	GSM850;
	unsigned int	GSM900;
	unsigned int	DCS1800;
	unsigned int	PCS1900;
} RFBandSupport_S;

typedef struct {
	MS_CAPABILITY_E		capability;
	RFBandSupport_S		band_support;
} RfMsCapability_S;

typedef struct {
	unsigned int	GSM:1;
	unsigned int	GPRS:1;
	unsigned int	EDGE_RX:1;
	unsigned int	EDGE_8PSK_TX:1;
	unsigned int	Calibration_8PM:1;
} RfMsCapabilityBits;

typedef struct {
	unsigned int	GSM400:1;
	unsigned int	GSM850:1;
	unsigned int	GSM900:1;
	unsigned int	DCS1800:1;
	unsigned int	PCS1900:1;
} RfMsBandSupportBits;

typedef struct {
	RfMsCapabilityBits		capability;
	RfMsBandSupportBits		band_support;
} RfMsCapabilityEx_S;

typedef enum {
	AFC_SINWAVE_OFF = 0
	,AFC_SINWAVE_ON
} AFC_SINWAVE_DETECTION_E;

typedef struct {
	ARFCN			arfcn;				// Absolute radio frequency channel number
	ContTxPattern	pattern;
	unsigned short	pattern_data;
	unsigned char	OnOff;				// On or off 
	unsigned short	modtype;			// modulation type: 0->GMSK, 1->EPSK 
} RfCnTxEx_Req;

typedef struct {
	ARFCN			arfcn;				// Absolute radio frequency channel number
	ContTxPattern	pattern;
	unsigned short	pattern_data;
	unsigned char	OnOff;				// On or off 
	unsigned short	modtype;			// modulation type: 0->GMSK, 1->EPSK 
	Power			powerLev;			// power level 
} RfCnTxEx2_Req;

//-----------------------------------------------------//
//  TX Ramping Table                                   //
//-----------------------------------------------------//
#define PROFILE_NUM             16
#define ARFCN_SECTION_NUM       12

typedef  struct
{
   unsigned char   point[2][16];	// ramp up/down profile

} sRAMPAREADATA;

typedef  struct
{
   short			max_arfcn;		// sub-band boundary of this PCL weighting area
   unsigned short   mid_level;		// PCLboundary level to apply high/low weighting
   unsigned short   hi_weight;		// scale factor of PCLs higher than mid_level
   unsigned short   low_weight;		// scale factor of PCLs lower than mid_level

} sARFCN_SECTION;

typedef  struct
{
   int				lowest_power;						// The lower apc power of the indicated band
   unsigned short	power[16];							// The mapping of power level to apc dac value
   sRAMPAREADATA	ramp[ PROFILE_NUM ];				// ramp profile
   sARFCN_SECTION	arfcn_weight[ ARFCN_SECTION_NUM ];	// profile of weighting power level by PCL and sub-band
   unsigned short	battery_compensate[3][3];			// [volt][temp] 
   short			tx_afc_offset;
} sRAMPDATA;

typedef struct
{
   sRAMPDATA          rampData;							// apc ramp profile of all bands
}l1cal_rampTable_T;

//-----------------------------------------------------//
//  TX Inter Ramping Table                             //
//-----------------------------------------------------//

// interRampData 
typedef struct {   
	unsigned char	interRampData[16];
} l1cal_interRampData_T;

// EPSK interRampData 
typedef struct {
	unsigned char	EPSK_interRampData[4][16];
} l1cal_EPSK_interRampData_T;

//-----------------------------------------------------//
//  RF Module Special Coef                             //
//-----------------------------------------------------//

// Skyworks 
typedef struct {
	unsigned int		icorrection;
	unsigned int		qcorrection;
} RF_SKY74045_IP2_Coef;

typedef struct {
	RF_SKY74045_IP2_Coef	coef[5/*band*/];
} RF_SKY74045_RX_Coef;

typedef struct {
	RF_SKY74045_RX_Coef		rx;
} RF_SKY74045_Coef_T;

typedef struct {
	unsigned int			ipol;
	unsigned int			qpol;
} RF_SKY74117_IP2_Pol;

typedef struct {
	RF_SKY74045_IP2_Coef	coef[5/*band*/];
	RF_SKY74117_IP2_Pol		pol[5/*band*/];
} RF_SKY74117_RX_Coef;

typedef struct {
	RF_SKY74117_RX_Coef		rx;
} RF_SKY74117_Coef_T;

// MT6139B 
typedef struct {
	unsigned int		acode;
	unsigned int		amcode;
} RF_MT6139B_IP2_Coef;

typedef struct {  
	RF_MT6139B_IP2_Coef		coef[5/*band*/];
	unsigned int			rxamcalmode;
} RF_MT6139B_RX_Coef;

typedef struct {
	RF_MT6139B_RX_Coef		rx;
} RF_MT6139B_Coef_T;

// Bright5P 
typedef struct {
	unsigned int		word6_4_0;
	unsigned int		word6_5_0;
	unsigned int		word6_6_0;
	unsigned int		word6_7_0;
	unsigned int		bvmode;
	unsigned int		c3mode;
	unsigned int		wordC3;
} RF_BRIGHT5P_TX_Coef;

typedef struct {
	RF_BRIGHT5P_TX_Coef		tx;
} RF_BRIGHT5P_Coef_T;

//-----------------------------------------------------//
//  RF Testing: callback function definition           //
//-----------------------------------------------------//
typedef void (__stdcall *META_RF_PM_CNF)(const RfPm_Cnf *cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_AFC_CNF)(const RfAfc_Cnf *cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_NB_TX_CNF)(const unsigned char cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_CONT_RX_CNF)(const unsigned char cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_CONT_TX_CNF)(const unsigned char cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_SETBBTX_CFG_CNF)(const unsigned char cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_SELBAND_CNF)(const unsigned char cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_STOP_CNF)(const unsigned char cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_MULTISLOT_TX_CNF)(const unsigned char cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_SET_RAMPAPCLEVEL_CNF)(const unsigned char cnf, const short token, void *usrData);
typedef void (__stdcall *META_RF_SET_AFCDACVALUE_CNF)(const unsigned char cnf, const short token, void *usrData);

//-----------------------------------------------------//
//  RF Testing: exported function definition           //
//-----------------------------------------------------//
META_RESULT  __stdcall META_Rf_PM(const RfPm_Req *req, const META_RF_PM_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_PM_r(const int meta_handle, const RfPm_Req *req, const META_RF_PM_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_AFC(const RfAfc_Req *req, const META_RF_AFC_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_AFC_r(const int meta_handle, const RfAfc_Req *req, const META_RF_AFC_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_NB_TX(const RfNbtx_Req *req, const META_RF_NB_TX_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_NB_TX_r(const int meta_handle, const RfNbtx_Req *req, const META_RF_NB_TX_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_CONTINUE_RX(const RfCnRx_Req *req, const META_RF_CONT_RX_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_CONTINUE_RX_r(const int meta_handle, const RfCnRx_Req *req, const META_RF_CONT_RX_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_CONTINUE_TX(const RfCnTx_Req *req, const META_RF_CONT_TX_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_CONTINUE_TX_r(const int meta_handle, const RfCnTx_Req *req, const META_RF_CONT_TX_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_SetBBTXCfg(const RfSetBBTXCfg_Req *req, const META_RF_SETBBTX_CFG_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_SetBBTXCfg_r(const int meta_handle, const RfSetBBTXCfg_Req *req, const META_RF_SETBBTX_CFG_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_SelectFrequencyBand1900(const unsigned char selectPCS1900, const META_RF_SELBAND_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_SelectFrequencyBand1900_r(const int meta_handle, const unsigned char selectPCS1900, const META_RF_SELBAND_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_Stop(const META_RF_STOP_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_Stop_r(const int meta_handle, const META_RF_STOP_CNF cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_MultiSlot_TX(const RfMultiSlotTX_Req *req, const META_RF_MULTISLOT_TX_CNF  cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_MultiSlot_TX_r(const int meta_handle, const RfMultiSlotTX_Req *req, const META_RF_MULTISLOT_TX_CNF  cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_SetAfcDacValue(const RfSetAfcDacValue_Req *req, const META_RF_SET_AFCDACVALUE_CNF  cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_SetAfcDacValue_r(const int meta_handle, const RfSetAfcDacValue_Req *req, const META_RF_SET_AFCDACVALUE_CNF  cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_SetBBTxCfg2(unsigned int ms_timeout, const RfBBTXCfg2  *tx_cfg_req, RfBBTXCfg2  *tx_cfg_cnf);
META_RESULT  __stdcall META_Rf_SetBBTxCfg2_r(const int meta_handle, unsigned int ms_timeout, const RfBBTXCfg2  *tx_cfg_req, RfBBTXCfg2  *tx_cfg_cnf);
META_RESULT  __stdcall META_Rf_GetBBTxCfg2(unsigned int ms_timeout, RfBBTXCfg2  *tx_cfg_cnf);
META_RESULT  __stdcall META_Rf_GetBBTxCfg2_r(const int meta_handle, unsigned int ms_timeout, RfBBTXCfg2  *tx_cfg_cnf);
META_RESULT  __stdcall META_Rf_SetCrystalCapId(unsigned int ms_timeout, const RfSetCrystalCfg_Req  *req);
META_RESULT  __stdcall META_Rf_SetCrystalCapId_r(const int meta_handle, unsigned int ms_timeout, const RfSetCrystalCfg_Req  *req);
META_RESULT  __stdcall META_Rf_BBTXAutoCal(unsigned int ms_timeout);
META_RESULT  __stdcall META_Rf_BBTXAutoCal_r(const int meta_handle, unsigned int ms_timeout);
META_RESULT  __stdcall META_Rf_QueryMSCapability(unsigned int ms_timeout, RfMsCapability_S  *p_type);
META_RESULT  __stdcall META_Rf_QueryMSCapability_r(const int meta_handle, unsigned int ms_timeout, RfMsCapability_S  *p_type);
META_RESULT  __stdcall META_Rf_QueryMSCapabilityEx(unsigned int ms_timeout, RfMsCapabilityEx_S  *p_ms_cap);
META_RESULT  __stdcall META_Rf_QueryMSCapabilityEx_r(const int meta_handle, unsigned int ms_timeout, RfMsCapabilityEx_S  *p_ms_cap);
META_RESULT  __stdcall META_Rf_SetAfcSinWaveDetection(unsigned int ms_timeout, AFC_SINWAVE_DETECTION_E  bIsAfcSinWaveOn);
META_RESULT  __stdcall META_Rf_SetAfcSinWaveDetection_r(const int meta_handle, unsigned int ms_timeout, AFC_SINWAVE_DETECTION_E  bIsAfcSinWaveOn);
META_RESULT  __stdcall META_Rf_QueryIfTwoApcDCOffsetSupport(unsigned int ms_timeout);
META_RESULT  __stdcall META_Rf_QueryIfTwoApcDCOffsetSupport_r(const int meta_handle, unsigned int ms_timeout);
META_RESULT  __stdcall META_Rf_MultiSlot_TX_Ex(unsigned int ms_timeout, const Rf_MultiSlotTXEx_Req *req);
META_RESULT  __stdcall META_Rf_MultiSlot_TX_Ex_r(const int meta_handle, unsigned int ms_timeout, const Rf_MultiSlotTXEx_Req *req);
META_RESULT  __stdcall META_Rf_GetRFID(unsigned int ms_timeout, RFMod_ID *cnf);
META_RESULT  __stdcall META_Rf_GetRFID_r(const int meta_handle, unsigned int ms_timeout, RFMod_ID *cnf);
META_RESULT  __stdcall META_Rf_CONTINUE_TX_Ex(unsigned int ms_timeout, const RfCnTxEx_Req *req);
META_RESULT  __stdcall META_Rf_CONTINUE_TX_Ex_r(const int meta_handle, unsigned int ms_timeout, const RfCnTxEx_Req *req);
META_RESULT  __stdcall META_Rf_SetBBTxCfg3(unsigned int ms_timeout, const RfBBTXCfg3  *tx_cfg_req, RfBBTXCfg3  *tx_cfg_cnf);
META_RESULT  __stdcall META_Rf_SetBBTxCfg3_r(const int meta_handle, unsigned int ms_timeout, const RfBBTXCfg3  *tx_cfg_req, RfBBTXCfg3  *tx_cfg_cnf);
META_RESULT  __stdcall META_Rf_GetBBTxCfg3(unsigned int ms_timeout, RfBBTXCfg3  *tx_cfg_cnf);
META_RESULT  __stdcall META_Rf_GetBBTxCfg3_r(const int meta_handle, unsigned int ms_timeout, RfBBTXCfg3  *tx_cfg_cnf);
META_RESULT  __stdcall META_Rf_CONTINUE_TX_Ex2(unsigned int ms_timeout, const RfCnTxEx2_Req *req);
META_RESULT  __stdcall META_Rf_CONTINUE_TX_Ex2_r(const int meta_handle, unsigned int ms_timeout, const RfCnTxEx2_Req *req);
//-----------------------------------------------------//
//  RunTime Setting Functions Without Update NVRAM     //
//-----------------------------------------------------//
META_RESULT  __stdcall META_Rf_SetRampTable(unsigned int ms_timeout, FrequencyBand  band, const l1cal_rampTable_T  *ramp);
META_RESULT  __stdcall META_Rf_SetRampTable_r(const int meta_handle, unsigned int ms_timeout, FrequencyBand  band, const l1cal_rampTable_T  *ramp);
META_RESULT  __stdcall META_Rf_SetRampApcLevel(const RfSetRampApcLevel_Req *req, const META_RF_SET_RAMPAPCLEVEL_CNF  cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_SetRampApcLevel_r(const int meta_handle, const RfSetRampApcLevel_Req *req, const META_RF_SET_RAMPAPCLEVEL_CNF  cb, short *token, void *usrData);
META_RESULT  __stdcall META_Rf_EPSK_SetRampTable(unsigned int ms_timeout, FrequencyBand  band, const l1cal_rampTable_T  *ramp);
META_RESULT  __stdcall META_Rf_EPSK_SetRampTable_r(const int meta_handle, unsigned int ms_timeout, FrequencyBand  band, const l1cal_rampTable_T  *ramp);
META_RESULT  __stdcall META_Rf_EPSK_SetRampApcLevel(unsigned int ms_timeout, const RfSetRampApcLevel_Req *req);
META_RESULT  __stdcall META_Rf_EPSK_SetRampApcLevel_r(const int meta_handle, unsigned int ms_timeout, const RfSetRampApcLevel_Req *req);
META_RESULT  __stdcall META_Rf_SetRFImmediateBSI(unsigned int ms_timeout, const unsigned int bsi_data);
META_RESULT  __stdcall META_Rf_SetRFImmediateBSI_r(const int meta_handle, unsigned int ms_timeout, const unsigned int bsi_data);
META_RESULT  __stdcall META_Rf_GetRFImmediateBSI(unsigned int ms_timeout, unsigned int bsi_addr, unsigned int *p_bsi_data);
META_RESULT  __stdcall META_Rf_GetRFImmediateBSI_r(const int meta_handle, unsigned int ms_timeout, unsigned int bsi_addr, unsigned int *p_bsi_data);
// Skyworks 
META_RESULT  __stdcall META_Rf_SKY74045_SetSpecialCoef(unsigned int ms_timeout, const RF_SKY74045_Coef_T *rf_mod_coef);
META_RESULT  __stdcall META_Rf_SKY74045_SetSpecialCoef_r(const int meta_handle, unsigned int ms_timeout, const RF_SKY74045_Coef_T *rf_mod_coef);
META_RESULT  __stdcall META_Rf_SKY74117_SetSpecialCoef(unsigned int ms_timeout, const RF_SKY74117_Coef_T *rf_mod_coef);
META_RESULT  __stdcall META_Rf_SKY74117_SetSpecialCoef_r(const int meta_handle, unsigned int ms_timeout, const RF_SKY74117_Coef_T *rf_mod_coef);
// MT6139B 
META_RESULT  __stdcall META_Rf_MT6139B_SetSpecialCoef(unsigned int ms_timeout, const RF_MT6139B_Coef_T *rf_mod_coef);
META_RESULT  __stdcall META_Rf_MT6139B_SetSpecialCoef_r(const int meta_handle, unsigned int ms_timeout, const RF_MT6139B_Coef_T *rf_mod_coef);
// Renesas Bright5P 
META_RESULT  __stdcall META_Rf_BRIGHT5P_SetSpecialCoef(unsigned int ms_timeout, const RF_BRIGHT5P_Coef_T *rf_mod_coef);
META_RESULT  __stdcall META_Rf_BRIGHT5P_SetSpecialCoef_r(const int meta_handle, unsigned int ms_timeout, const RF_BRIGHT5P_Coef_T *rf_mod_coef);

//--------------------------------------------------------------------------//
//  NVRAM                                                                   //
//--------------------------------------------------------------------------//

//-----------------------------------------------------//
//  NVRAM: data structure definition                   //
//-----------------------------------------------------//

// Reset NVRAM
typedef enum 
{
	NVRAM_RESET_ALL,		// Reset all data items in both of user and system category
	NVRAM_RESET_USER,		// Reset data items in user category
	NVRAM_RESET_SYSTEM,		// Reset data items in system category
	NVRAM_RESET_CERTAIN,	// Reset certain data item according to LID
	NVRAM_RESET_FACTORY		// Reset to factory default value, all the LIDs has FACTORY attribute will be reseted 
} ResetCategory;   

typedef struct
{
	ResetCategory	category;	// Reset category

	const char		*LID;		// The name of logical data item ID , it will be used
								// if and only if ResetCategory = NVRAM_RESET_CERTAIN,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -