meta.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:167k
- //--------------------------------------------------------------------------//
- //-----------------------------------------------------//
- // 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,
- // in other case you can just assign NULL.
- } FT_NVRAM_RESET_REQ;
- typedef struct
- {
- unsigned char status; // The status of Reset
- } FT_NVRAM_RESET_CNF;
- // Read from NVRAM
- typedef struct
- {
- const char *LID; // The name of logical data item ID
- unsigned short RID; // Record ID (the first record is 1)
- } FT_NVRAM_READ_REQ;
- typedef struct
- {
- unsigned short LID; // Logical data item ID of a EF
- unsigned short RID; // Record ID (the first record is 1)
- unsigned char status; // 0: read ok; others: read failed.
- unsigned int len; // [IN] Length of Buffer, [OUT] Length of read data
- // The "len" field indicates the size of "buf" you
- // allocated. When the data is read back, "len" will
- // be replaced with the actual size of the data.
- unsigned char *buf; // Buffer that will contains the content of record
- } FT_NVRAM_READ_CNF;
- //Write to NVRAM
- typedef struct
- {
- const char *LID; // The name of logical data item ID
- unsigned short RID; // Record ID (the first record is 1)
- unsigned int len; // Length of write data
- unsigned char *buf; // Buffer that contains the content of record
- } FT_NVRAM_WRITE_REQ;
- typedef struct
- {
- unsigned short LID; // Logical data item ID of a EF
- unsigned short RID; // Record ID (the first record is 1)
- unsigned char status; // 0: write ok; others: write failed.
- } FT_NVRAM_WRITE_CNF;
- // AGC path loss
- #define PLTABLE_SIZE 13 // element count of path loss table
- typedef struct
- {
- short max_arfcn; // The maximum ARFCN of the indicated sub-band
- char gain_offset; // The maximum available gain of transceiver of the indicated sub-band
- } sAGCGAINOFFSET;
- typedef struct
- {
- sAGCGAINOFFSET agcPathLoss[FrequencyBandCount][PLTABLE_SIZE];
- }l1cal_agcPathLoss_T;
- // Speech Coefficient
- typedef struct {
- short Speech_8k_Input_Coeff[30]; // FIR for input speech (microphone) with 8k sampling rate
- short Speech_8k_Output_Coeff[30]; // FIR for output speech (speaker) with 8k sampling rate
- short Speech_16k_Input_Coeff[62]; // FIR for input speech (microphone) with 16k sampling rate
- short Speech_16k_Output_Coeff[62]; // FIR for output speech (speaker) with 16k sampling rate
- short Additional_Speech_8k_Output_Coeff[5][30]; // The additional FIR for output speech (speaker) with 8k sampling rate
- unsigned short Speech_8k_Output_Coeff_Index; // The active FIR index
- // 0 -> Speech_8k_Output_Coeff
- // 1 -> Additional_Speech_8k_Output_Coeff[0]
- // 2 -> Additional_Speech_8k_Output_Coeff[1]
- // 3 -> Additional_Speech_8k_Output_Coeff[2]
- // 4 -> Additional_Speech_8k_Output_Coeff[3]
- // 5 -> Additional_Speech_8k_Output_Coeff[4]
- }L1_SpeechCoeff_T;
- // Melody Coefficient
- typedef struct {
- short Melody_32k_Output_Coeff[45]; // FIR for melody playback with with 32k sampling rate
- }L1_MelodyCoeff_T;
- // L1Audio Param
- typedef struct{
- L1_SpeechCoeff_T Speech_FIR[2]; // [0]: normal mode
- // [1]: headset mode
- // NOTE: In headset mode, Additional_Speech_8k_Output_Coeff and
- // Speech_8k_Output_Coeff_Index are ignored! you can just
- // leave them alone.
- L1_MelodyCoeff_T Melody_FIR[2]; // [0]: loud speaker mode
- // [1]: stereo speaker mode
- unsigned short ES_TimeConst;
- unsigned short ES_VolConst;
- unsigned short ES_TimeConst2;
- unsigned short ES_VolConst2;
- unsigned short Media_Playback_Maximum_Swing;
- }l1audio_param_T;
- // L1Audio Param from W0547
- #define SPEECH_NORMAL_MODE 0
- #define SPEECH_EARPHONE_MODE 1
- #define SPEECH_LOUDSPEAKER_MODE 2
- #define SPEECH_BT_ERAPHONE_MODE 3
- #define SPEECH_BT_CORDLESS_MODE 4
- #define SPEECH_AUX1_MODE 5
- #define SPEECH_AUX2_MODE 6
- #define SPEECH_AUX3_MODE 7
- typedef struct{
- L1_SpeechCoeff_T Speech_FIR[2]; // [0]: normal mode
- // [1]: headset mode
- // NOTE: In headset mode, Additional_Speech_8k_Output_Coeff and
- // Speech_8k_Output_Coeff_Index are ignored! you can just
- // leave them alone.
- L1_MelodyCoeff_T Melody_FIR[2]; // [0]: loud speaker mode
- // [1]: stereo speaker mode
- unsigned short Speech_Common_Para[12];
- unsigned short Speech_ModeDependent_Para[8][8]; // [0]: Normal Mode
- // [1]: Earphone Mode
- // [2]: Loud Speaker Mode
- // [3]: BlueTooth Earphone Mode
- // [4]: BlueTooth Cordless Mode
- // [5]: AUX1 Mode
- // [6]: AUX2 Mode
- // [7]: AUX3 Mode
- unsigned short Media_Playback_Maximum_Swing;
- } l1audio_param_W0547_T;
- typedef struct{
- short speech_input_FIR_coeffs[6][45];
- short speech_output_FIR_coeffs[6][45];
- unsigned short selected_FIR_output_index;
- unsigned short speech_common_para[12];
- unsigned short speech_normal_mode_para[8];
- unsigned short speech_earphone_mode_para[8];
- unsigned short speech_loudspk_mode_para[8];
- unsigned short speech_bt_earphone_mode_para[8];
- unsigned short speech_bt_cordless_mode_para[8];
- unsigned short speech_aux1_mode_para[8];
- unsigned short speech_aux2_mode_para[8];
- unsigned short speech_aux3_mode_para[8];
- unsigned short Media_Playback_Maximum_Swing;
- short Melody_FIR_Output_Coeff_32k_Tbl1[45];
- } l1audio_param_W0547_45_T;
- typedef struct{
- short speech_input_FIR_coeffs[6][45];
- short speech_output_FIR_coeffs[6][45];
- unsigned short selected_FIR_output_index;
- unsigned short speech_common_para[12];
- unsigned short speech_normal_mode_para[8];
- unsigned short speech_earphone_mode_para[8];
- unsigned short speech_loudspk_mode_para[8];
- unsigned short speech_bt_earphone_mode_para[8];
- unsigned short speech_bt_cordless_mode_para[8];
- unsigned short speech_aux1_mode_para[8];
- unsigned short speech_aux2_mode_para[8];
- unsigned short speech_aux3_mode_para[8];
- unsigned short Media_Playback_Maximum_Swing;
- short Melody_FIR_Output_Coeff_32k_Tbl1[25];
- } l1audio_param_W0712_T;
- typedef struct
- {
- short speech_input_FIR_coeffs[6][45];
- short speech_output_FIR_coeffs[6][45];
- unsigned short selected_FIR_output_index;
- unsigned short speech_common_para[12];
- unsigned short speech_mode_para[8][8];
- unsigned short Media_Playback_Maximum_Swing;
- short Melody_FIR_Coeff_Tbl[25];
- short audio_compensation_coeff[2][45]; // new added, so different with others structure
- } l1audio_param_W0740_T;
- typedef struct
- {
- short speech_input_FIR_coeffs[6][45];
- short speech_output_FIR_coeffs[6][45];
- unsigned short selected_FIR_output_index;
- unsigned short speech_common_para[12];
- unsigned short speech_mode_para[8][16];
- unsigned short speech_volume_para[3][7][4];
- unsigned short Media_Playback_Maximum_Swing;
- short Melody_FIR_Coeff_Tbl[25];
- short audio_compensation_coeff[2][45]; // new added, so different with others structure
- } l1audio_param_W0809_T; //l1audio_param_W0748_T;
- // crystalAfcData
- #define XO_SlopeArea_Num 8
- typedef struct {
- int min_freq;
- short min_dac;
- int inv_slope;
- }XO_SLOPE_AREA_DATA;
- typedef struct {
- XO_SLOPE_AREA_DATA XO_SlopeAreaData[XO_SlopeArea_Num];
- }l1cal_crystalAfcData_T;
- // IMEISV
- typedef struct {
- char imei[16];
- unsigned char svn;
- unsigned char pad;
- }IMEISV_struct_T;
- // Custom Acoustic Volume
- #define MAX_VOL_CATE 3
- #define MAX_VOL_TYPE 7
- #define MAX_VOL_LEVEL 7
- typedef struct {
- unsigned char volume_gain[MAX_VOL_CATE][MAX_VOL_TYPE][MAX_VOL_LEVEL];
- // Volume Gain: [Mode (Normal, Headset, LoudSpeaker)]
- // [Tone type (CallTone, Keytone, MIC, GMI, Speech, SideTone, Melody) ]
- // [Level (1~7)]
- unsigned char volume[MAX_VOL_CATE][MAX_VOL_TYPE];
- // Current Volume Level: [Mode (Normal, Headset, LoudSpeaker)]
- // [Tone type (CallTone, Keytone, MIC, GMI, Speech, SideTone, Melody) ]
- // value: 0~6 [ Level_1(0) ~ Level_7(6) ]
-
- } CustAcousticVol_T;
- typedef struct {
- unsigned char volume_gain[MAX_VOL_CATE][MAX_VOL_TYPE][MAX_VOL_LEVEL];
- // Volume Gain: [Mode (Normal, Headset, LoudSpeaker)]
- // [Tone type (CallTone, Keytone, MIC, GMI, Speech, SideTone, Melody) ]
- // [Level (1~7)]
- unsigned char volume[MAX_VOL_CATE][MAX_VOL_TYPE];
- // Current Volume Level: [Mode (Normal, Headset, LoudSpeaker)]
- // [Tone type (CallTone, Keytone, MIC, GMI, Speech, SideTone, Melody) ]
- // value: 0~6 [ Level_1(0) ~ Level_7(6) ]
- unsigned char max_melody_volume_gain[MAX_VOL_CATE + 1];
- unsigned char melody_volume_gain_step[MAX_VOL_CATE + 1];
- unsigned char tv_out_volume_gain[MAX_VOL_LEVEL];
- } CustAcousticVol16lvl_T;
- // S/W Change
- typedef enum {
- LID_VER_SAME = 0,
- LID_VER_CHANGED
- }LID_STATUS;
- typedef struct {
- int OldVer;
- int NewVer;
- char LID[64];
- }LID_Info;
- typedef struct {
- int target_nvramsize; // current NVRAM size on target FAT file system
- int target_freespace; // current freespace of target FAT file system
- int target_overhead; // S/W upgrade operation overhead
- int newdb_nvramsize; // new NVRAM size
- unsigned char status; // 0 -> [OK] safe to upgrade to new NVRAM
- // 1 -> [ERROR] can't retrieve info from target
- // 2 -> [ERROR] freespace is not enough to upgrade to new NVRAM
- } NVRAM_GetDiskInfo_Cnf;
- // WiFi
- typedef struct {
- unsigned char mac_addr[6];
- } WiFi_MacAddress_S;
- typedef struct {
- unsigned char CCKTxPWR[14];
- unsigned char OFDMTxPWR[14];
- } WiFi_TxPower_2400M_S;
- typedef struct {
- unsigned char TxPWR[34];
- } WiFi_TxPower_5000M_S;
- typedef struct {
- unsigned char i_ch_offset;
- unsigned char q_ch_offset;
- } WiFi_DAC_DC_Offset_S;
- typedef struct {
- unsigned char txAlcCCK[14];
- unsigned char txOutputPowerDBCCK[14];
- unsigned char txAlcOFDM [8][14];
- unsigned char txOutputPowerDBOFDM[8][14];
- } WiFi_ALC_2400M_S;
- typedef struct
- {
- unsigned char alcSlop1Divider;
- unsigned char alcSlop1Dividend;
- unsigned char alcSlop2Divider;
- unsigned char alcSlop2Dividend;
- } WiFi_TxALC_2400M_S;
- typedef struct
- {
- unsigned char BluetoothAddress[6];
- unsigned char MinEncryptionSize[1];
- unsigned char MaxEncryptionSize[1];
- unsigned char HCITransportLayerParameters[3];
- unsigned char FixedPIN[16];
- unsigned char FixedPINLength[1];
- unsigned char SleepEnableMask[1];
- unsigned char LowPowerClockParameter[8];
- unsigned char PowerControlConfiguration[13];
- unsigned char SleepControlParameters[12];
- unsigned char DebugControl[4];
- unsigned char LCandRMOverrideEnable[4];
- unsigned char RadioRegisterOverride[6];
- unsigned char CodecConfiguration[8];
- unsigned char CVSDGainVolumeSettings[6];
- unsigned char VoiceSettings[2];
- unsigned char UserBaudRate[3];
- unsigned char LowPowerDriftRate[1];
- unsigned char MaxTxPowerLevel[1];
- unsigned char AdaptiveFrequencyHoppingParameters[29];
- unsigned char BufferSize[4];
- unsigned char GpioMapping[16];
- unsigned char GpioPolarity[4];
- } nvram_ef_btradio_rfmd3500_struct;
- typedef struct
- {
- unsigned char BDAddr[6];
- unsigned char ClassOfDevice[3];
- unsigned char LinkKeyType[1];
- unsigned char UnitKey[16];
- unsigned char Encryption[3];
- unsigned char PinCodeType[1];
- unsigned char Voice[2];
- unsigned char Codec[1];
- unsigned char Radio[30];
- unsigned char Sleep[6];
- unsigned char MainOscillatorInfo[5];
- unsigned char LPOInfo[4];
- unsigned char AFH[9];
- unsigned char PTA[49];
- unsigned char WDT[2];
- unsigned char Debug[1];
- unsigned char UART[2];
- } nvram_ef_btradio_mt6601_struct;
- typedef struct
- {
- unsigned char BDAddr[6];
- unsigned char CapId[1];
- unsigned char LinkKeyType[1];
- unsigned char UnitKey[16];
- unsigned char Encryption[3];
- unsigned char PinCodeType[1];
- unsigned char Voice[2];
- unsigned char Codec[1];
- unsigned char Radio[6];
- unsigned char Sleep[7];
- unsigned char Reserved[2];
- }nvram_ef_btradio_mt6611_struct;
- //-----------------------------------------------------//
- // NVRAM: callback function definition //
- //-----------------------------------------------------//
- typedef void (__stdcall *META_NVRAM_Reset_CNF)(const FT_NVRAM_RESET_CNF *cnf, const short token, void *usrData);
- typedef void (__stdcall *META_NVRAM_Read_CNF)(const FT_NVRAM_READ_CNF *cnf, const short token, void *usrData);
- typedef void (__stdcall *META_NVRAM_Write_CNF)(const FT_NVRAM_WRITE_CNF *cnf, const short token, void *usrData);
- typedef void (__stdcall *CB_META_NVRAM_GET_DISK_INFO_CNF)(const NVRAM_GetDiskInfo_Cnf *cnf, const short token, void *usrData);
- //-----------------------------------------------------//
- // NVRAM: exported function definition //
- //-----------------------------------------------------//
- META_RESULT __stdcall META_NVRAM_Init(const char *PathName, unsigned long *p_nvram_CatcherTranAddr);
- META_RESULT __stdcall META_NVRAM_Init_r(const int meta_handle,const char *PathName, unsigned long *p_nvram_CatcherTranAddr);
- META_RESULT __stdcall META_NVRAM_Reset(const FT_NVRAM_RESET_REQ *req, const META_NVRAM_Reset_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_NVRAM_Reset_r(const int meta_handle, const FT_NVRAM_RESET_REQ *req, const META_NVRAM_Reset_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_NVRAM_Read(const FT_NVRAM_READ_REQ *req, FT_NVRAM_READ_CNF *cnf, const META_NVRAM_Read_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_NVRAM_Read_r(const int meta_handle, const FT_NVRAM_READ_REQ *req, FT_NVRAM_READ_CNF *cnf, const META_NVRAM_Read_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_NVRAM_Write(const FT_NVRAM_WRITE_REQ *req, const META_NVRAM_Write_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_NVRAM_Write_r(const int meta_handle, const FT_NVRAM_WRITE_REQ *req, const META_NVRAM_Write_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_NVRAM_GetAllLIDNameLength(int *len);
- META_RESULT __stdcall META_NVRAM_GetAllLIDName(char *buf, const int buf_len, int *NofLID);
- META_RESULT __stdcall META_NVRAM_GetLIDVersion(const char *LID,unsigned short *ver);
- META_RESULT __stdcall META_NVRAM_GetRecStructNameLength(const char *LID, int *len);
- META_RESULT __stdcall META_NVRAM_GetRecStructName(const char *LID, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_GetAllRecFieldNameLength(const char *LID, int *len);
- META_RESULT __stdcall META_NVRAM_GetAllRecFieldName(const char *LID, char *buf, const int buf_len, int *NofField);
- META_RESULT __stdcall META_NVRAM_CheckFieldNameExist(const char *LID, const char *Field, bool *result);
- META_RESULT __stdcall META_NVRAM_GetRecNum(const char *LID, int *num);
- META_RESULT __stdcall META_NVRAM_GetRecLen(const char *LID, int *len);
- META_RESULT __stdcall META_NVRAM_SetRecFieldValue(const char *LID, const char *field, char *buf, const int buf_len, void *value, const int value_len);
- META_RESULT __stdcall META_NVRAM_GetRecFieldValue(const char *LID, const char *field, const char *buf, const int buf_len, void *value, const int value_len);
- META_RESULT __stdcall META_NVRAM_SetRecFieldBitValue(const char *LID, const char *field, const char *bitname, char *buf, const int buf_len, const int bitvalue);
- META_RESULT __stdcall META_NVRAM_GetRecFieldBitValue(const char *LID, const char *field, const char *bitname, const char *buf, const int buf_len, int *bitvalue);
- META_RESULT __stdcall META_NVRAM_QueryIsLIDExist(const char *LID);
- META_RESULT __stdcall META_NVRAM_ResetToFactoryDefault(unsigned int ms_timeout);
- META_RESULT __stdcall META_NVRAM_ResetToFactoryDefault_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_NVRAM_LockDown(unsigned int ms_timeout);
- META_RESULT __stdcall META_NVRAM_LockDown_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_NVRAM_OTP_LockDown(unsigned int ms_timeout);
- META_RESULT __stdcall META_NVRAM_OTP_LockDown_r(const int meta_handle, unsigned int ms_timeout);
- // S/W Change
- META_RESULT __stdcall META_NVRAM_SWC_RetrieveChangeList(void);
- META_RESULT __stdcall META_NVRAM_SWC_RetrieveChangeList_r(const int meta_handle);
- META_RESULT __stdcall META_NVRAM_SWC_UpdateChangeList(void);
- META_RESULT __stdcall META_NVRAM_SWC_UpdateChangeList_r(const int meta_handle);
- META_RESULT __stdcall META_NVRAM_SWC_GetAllChangedLIDCount(int *NofLID);
- META_RESULT __stdcall META_NVRAM_SWC_GetAllChangedLIDCount_r(const int meta_handle, int *NofLID);
- META_RESULT __stdcall META_NVRAM_SWC_GetAllChangedLIDName(LID_Info *p_ArrayOfLID, const int NofLID);
- META_RESULT __stdcall META_NVRAM_SWC_GetAllChangedLIDName_r(const int meta_handle, LID_Info *p_ArrayOfLID, const int NofLID);
- META_RESULT __stdcall META_NVRAM_SWC_QueryIfLIDChanged(const char *LID, LID_STATUS *result);
- META_RESULT __stdcall META_NVRAM_SWC_QueryIfLIDChanged_r(const int meta_handle, const char *LID, LID_STATUS *result);
- META_RESULT __stdcall META_NVRAM_SWC_ImportData(LID_Info *p_import_multiple_lid, int num_of_import_multiple_lid, int import_1st_sys_record_size );
- META_RESULT __stdcall META_NVRAM_SWC_ImportData_r(const int meta_handle, LID_Info *p_import_multiple_lid, int num_of_import_multiple_lid, int import_1st_sys_record_size );
- META_RESULT __stdcall META_NVRAM_SWC_Database_Compare(const char *PathName, int *p_NumOfNewAddLID, int *p_NumOfModifiedLID, int *p_NumOfDeletedLID);
- META_RESULT __stdcall META_NVRAM_SWC_Database_Compare_r(const int meta_handle, const char *PathName, int *p_NumOfNewAddLID, int *p_NumOfModifiedLID, int *p_NumOfDeletedLID);
- META_RESULT __stdcall META_NVRAM_SWC_Get_Database_Compare_Result(LID_Info *p_ArrayOfNewAddLID, const int NumOfNewAddLID, LID_Info *p_ArrayOfModifiedLID, const int NumOfModifiedLID, LID_Info *p_ArrayOfDeletedLID, const int NumOfDeletedLID);
- META_RESULT __stdcall META_NVRAM_SWC_Get_Database_Compare_Result_r(const int meta_handle, LID_Info *p_ArrayOfNewAddLID, const int NumOfNewAddLID, LID_Info *p_ArrayOfModifiedLID, const int NumOfModifiedLID, LID_Info *p_ArrayOfDeletedLID, const int NumOfDeletedLID);
- META_RESULT __stdcall META_NVRAM_SWC_Check_FAT_FreeSpace(const CB_META_NVRAM_GET_DISK_INFO_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_NVRAM_SWC_Check_FAT_FreeSpace_r(const int meta_handle, const CB_META_NVRAM_GET_DISK_INFO_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_NVRAM_SWC_Enable_ForceUpgrade(void);
- META_RESULT __stdcall META_NVRAM_SWC_Enable_ForceUpgrade_r(const int meta_handle);
- META_RESULT __stdcall META_NVRAM_SWC_Disable_ForceUpgrade(void);
- META_RESULT __stdcall META_NVRAM_SWC_Disable_ForceUpgrade_r(const int meta_handle);
- // AGC path loss
- META_RESULT __stdcall META_NVRAM_agcPathLoss_Len(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_agcPathLoss(const l1cal_agcPathLoss_T *loss, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_agcPathLoss(l1cal_agcPathLoss_T *loss, const char *buf, const int buf_len);
- // rampTable
- META_RESULT __stdcall META_NVRAM_rampTable_Len(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_rampTable(const l1cal_rampTable_T *tbl, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_rampTable(l1cal_rampTable_T *tbl, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_rampTable_Len_Ex(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_rampTable_Ex(const l1cal_rampTable_T_Ex *tbl, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_rampTable_Ex(l1cal_rampTable_T_Ex *tbl, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_rampTable_Len_Ex2(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_rampTable_Ex2(const l1cal_rampTable_T_Ex2 *tbl, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_rampTable_Ex2(l1cal_rampTable_T_Ex2 *tbl, const char *buf, const int buf_len);
- // L1Audio Param
- META_RESULT __stdcall META_NVRAM_AudioParam_Len(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_AudioParam(const l1audio_param_T *param, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_AudioParam(l1audio_param_T *param, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_If_AudioParam_W0547_Support(void);
- META_RESULT __stdcall META_NVRAM_Compose_AudioParam_W0547(const l1audio_param_W0547_T *param, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_AudioParam_W0547(l1audio_param_W0547_T *param, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Compose_AudioParam_W0547_45(const l1audio_param_W0547_45_T *param, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_AudioParam_W0547_45(l1audio_param_W0547_45_T *param, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Compose_AudioParam_W0712(const l1audio_param_W0712_T *param, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_AudioParam_W0712(l1audio_param_W0712_T *param, const char *buf, const int buf_len);
- // interRampData
- META_RESULT __stdcall META_NVRAM_interRampData_Len(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_interRampData(const l1cal_interRampData_T *tbl, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_interRampData(l1cal_interRampData_T *tbl, const char *buf, const int buf_len);
- // crystalAfcData
- META_RESULT __stdcall META_NVRAM_crystalAfcData_Len(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_crystalAfcData(const l1cal_crystalAfcData_T *xo_afc, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_crystalAfcData(l1cal_crystalAfcData_T *xo_afc, const char *buf, const int buf_len);
- // IMEISV
- META_RESULT __stdcall META_NVRAM_Calculate_IMEI_CD(const char *imei, unsigned short *p_cd);
- META_RESULT __stdcall META_NVRAM_IMEISV_Len(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_IMEISV(const IMEISV_struct_T *p_imeisv, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Compose_IMEISV_NoCheck(const IMEISV_struct_T *p_imeisv, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Compose_IMEISV_ex(const IMEISV_struct_T *p_imeisv, char *buf, const int buf_len,bool DoCheckSum);
- META_RESULT __stdcall META_NVRAM_Decompose_IMEISV(IMEISV_struct_T *p_imeisv, const char *buf, const int buf_len);
- // Custom Acoustic Volume
- META_RESULT __stdcall META_NVRAM_CustAcousticVol_Len(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_CustAcousticVol(const CustAcousticVol_T *cust_acoustic_vol, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_CustAcousticVol(CustAcousticVol_T *cust_acoustic_vol, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Compose_16lvlCustAcousticVol(const CustAcousticVol16lvl_T *cust_acoustic_vol, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_16lvlCustAcousticVol(CustAcousticVol16lvl_T *cust_acoustic_vol, const char *buf, const int buf_len);
- // RF Module Configuration
- META_RESULT __stdcall META_NVRAM_RFSpecialCoef_Len(int *len);
- // Skyworks
- META_RESULT __stdcall META_NVRAM_Compose_SKY74045_RFSpecialCoef(const RF_SKY74045_Coef_T *rf_mod_coef, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_SKY74045_RFSpecialCoef(RF_SKY74045_Coef_T *rf_mod_coef, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Compose_SKY74117_RFSpecialCoef(const RF_SKY74117_Coef_T *rf_mod_coef, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_SKY74117_RFSpecialCoef(RF_SKY74117_Coef_T *rf_mod_coef, const char *buf, const int buf_len);
- // MT6139B
- META_RESULT __stdcall META_NVRAM_Compose_MT6139B_RFSpecialCoef(const RF_MT6139B_Coef_T *rf_mod_coef, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_MT6139B_RFSpecialCoef(RF_MT6139B_Coef_T *rf_mod_coef, const char *buf, const int buf_len);
- // MT6140
- //META_RESULT __stdcall META_NVRAM_Compose_MT6140tx_RFSpecialCoef(const mt6140tx *rf_mod_coef, char *buf, const int buf_len);
- //META_RESULT __stdcall META_NVRAM_Decompose_MT6140tx_RFSpecialCoef(mt6140tx *rf_mod_coef, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Compose_MT6140tx_PaVbias(const mt6140tx *pavbias, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_MT6140tx_PaVbias(mt6140tx *pavbias, const char *buf, const int buf_len);
- // Renesas Bright5P
- META_RESULT __stdcall META_NVRAM_Compose_BRIGHT5P_RFSpecialCoef(const RF_BRIGHT5P_Coef_T *rf_mod_coef, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_BRIGHT5P_RFSpecialCoef(RF_BRIGHT5P_Coef_T *rf_mod_coef, const char *buf, const int buf_len);
- // EPSK interRampData
- META_RESULT __stdcall META_NVRAM_EPSK_interRampData_Len(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_EPSK_interRampData(const l1cal_EPSK_interRampData_T *tbl, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_EPSK_interRampData(l1cal_EPSK_interRampData_T *tbl, const char *buf, const int buf_len);
- // WiFi
- META_RESULT __stdcall META_NVRAM_WiFi_MacAddress_Len(int *len);
- META_RESULT __stdcall META_NVRAM_WiFi_Compose_MacAddress(const WiFi_MacAddress_S *mac, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_Decompose_MacAddress(WiFi_MacAddress_S *mac, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_TxPower2400M_Len(int *len);
- META_RESULT __stdcall META_NVRAM_WiFi_Compose_TxPower2400M(const WiFi_TxPower_2400M_S *txpwr, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_Decompose_TxPower2400M(WiFi_TxPower_2400M_S *txpwr, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_TxPower5000M_Len(int *len);
- META_RESULT __stdcall META_NVRAM_WiFi_Compose_TxPower5000M(const WiFi_TxPower_5000M_S *txpwr, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_Decompose_TxPower5000M(WiFi_TxPower_5000M_S *txpwr, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_DacDcOffset_Len(int *len);
- META_RESULT __stdcall META_NVRAM_WiFi_Compose_DacDcOffset(const WiFi_DAC_DC_Offset_S *dac, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_Decompose_DacDcOffset(WiFi_DAC_DC_Offset_S *dac, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_Compose_ALC_2400M(const WiFi_ALC_2400M_S *alc, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_Decompose_ALC_2400M(WiFi_ALC_2400M_S *alc, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_ALC_2400M_Len(int *len);
- META_RESULT __stdcall META_NVRAM_WiFi_TxALC2400M_Len(int *len);
- META_RESULT __stdcall META_NVRAM_WiFi_Compose_TxALC2400M(const WiFi_TxALC_2400M_S *txalc, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_WiFi_Decompose_TxALC2400M(WiFi_TxALC_2400M_S *txalc, const char *buf, const int buf_len);
- //3G
- META_RESULT __stdcall META_NVRAM_3G_Compose_tempdacData(const ul1cal_tempdacData_T *dac, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_3G_Decompose_tempdacData(ul1cal_tempdacData_T *dac, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_3G_Compose_pathlossData(const ul1cal_pathlossData_T *pathloss, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_3G_Decompose_pathlossData(ul1cal_pathlossData_T *pathloss, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_3G_Compose_txdacData(const ul1cal_txdacData_T *txdac, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_3G_Decompose_txdacData(ul1cal_txdacData_T *txdac, const char *buf, const int buf_len);
- //BT
- META_RESULT __stdcall META_NVRAM_BT_Compose_RFMD3500Radio(const nvram_ef_btradio_rfmd3500_struct *radio, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_BT_Decompose_RFMD3500Radio(nvram_ef_btradio_rfmd3500_struct *radio, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_BT_Compose_MT6601Radio(const nvram_ef_btradio_mt6601_struct *radio, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_BT_Decompose_MT6601Radio(nvram_ef_btradio_mt6601_struct *radio, const char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_BT_Compose_MT6611Radio(const nvram_ef_btradio_mt6611_struct *radio, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_BT_Decompose_MT6611Radio(nvram_ef_btradio_mt6611_struct *radio, const char *buf, const int buf_len);
- // sBBTxParameters
- META_RESULT __stdcall META_NVRAM_BBTXParameters_Len(int *len);
- META_RESULT __stdcall META_NVRAM_Compose_BBTXParameters(const BBTXParameters_T *bbtx, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_BBTXParameters(BBTXParameters_T *bbtx, const char *buf, const int buf_len);
- //l1audio_param_W0740_T
- META_RESULT __stdcall META_NVRAM_Compose_AudioParam_W0740(const l1audio_param_W0740_T *param, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_AudioParam_W0740(l1audio_param_W0740_T *param, const char *buf, const int buf_len);
- // l1audio_param_W0809_T
- META_RESULT __stdcall META_NVRAM_Compose_AudioParam_W0809(const l1audio_param_W0809_T *param, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_AudioParam_W0809(l1audio_param_W0809_T *param, const char *buf, const int buf_len);
- // ad6546tx
- META_RESULT __stdcall META_NVRAM_Compose_ad6546tx(const ad6546tx *adtx, char *buf, const int buf_len);
- META_RESULT __stdcall META_NVRAM_Decompose_ad6546tx(ad6546tx *adtx, const char *buf, const int buf_len);
- //--------------------------------------------------------------------------//
- // Audio Testing //
- //--------------------------------------------------------------------------//
- //-----------------------------------------------------//
- // Audio Testing: data structure definition //
- //-----------------------------------------------------//
- // audio testing result
- typedef enum {
- AUD_RES_OK = 0, // OK
- AUD_RES_FAIL, // General Fail
- AUD_RES_BUSY, // system busy
- AUD_RES_DISC_FULL, // Memory full
- AUD_RES_OPEN_FILE_FAIL, // open file fail
- AUD_RES_END_OF_FILE, // play finish
- AUD_ERR_OP_NOT_SUPPORT = 0xFB, // added by ShuMin, for error handler enhancements// filepath too long
- AUD_ERR_STILL_PLAYING = 0xFC, // added by ShuMin, because I found target had this error value
- AUD_ERR_PEER_BUF_ERROR = 0xFD, // peer buf error
- AUD_ERR_FILEPATH_ERROR = 0xFE, // filepath error
- AUD_ERR_FILEPATH_TOO_LONG = 0xFF // filepath too long
- }AUDIO_RESULT;
- // play style enum
- typedef enum {
- FT_L4AUD_AUDIO_PLAY_CRESCENDO = 0, // Play sound for crescendo.
- FT_L4AUD_AUDIO_PLAY_INFINITE, // Play sound for infinite.
- FT_L4AUD_AUDIO_PLAY_ONCE, // Play sound for once.
- FT_L4AUD_AUDIO_PLAY_DESCENDO // Play sound for descendo.
- }AUDIO_PLAY_STYLE;
- // default system embeded audio id query
- typedef struct {
- unsigned short MinRingTone_ID;
- unsigned short MaxRingTone_ID;
- unsigned short MinMIDI_ID;
- unsigned short MaxMIDI_ID;
- unsigned short MinSound_ID;
- unsigned short MaxSound_ID;
- AUDIO_RESULT status;
- }Audio_Query_ID_Cnf;
- // play default system embeded audio by the given audio id
- typedef struct {
- unsigned short audio_id; // default system embeded audio id
- AUDIO_PLAY_STYLE play_style; // play style
- }Audio_Play_Req;
- // play audio from FAT by the given filepath
- typedef struct {
- const char *fat_filepath; // filepath on target FAT file system
- AUDIO_PLAY_STYLE play_style; // play style
- }Audio_Play_ByName_Req;
- // play imelody by the buffer from PC side
- typedef struct {
- const char *imy_buf; // buffer that stores iMelody content
- unsigned int imy_buf_len; // length of buffer
- unsigned char imy_instrument; // instrument id, 1 ~ 128
- AUDIO_PLAY_STYLE play_style; // play style
- }Audio_Play_IMY_ByBuf_Req;
- // play mp3 from FAT by the given filepath
- typedef struct {
- const char *fat_filepath; // filepath on target FAT file system
- AUDIO_PLAY_STYLE play_style; // play style
- }Audio_MEDIA_Play_Req;
- // set volume
- typedef struct {
- unsigned char volume; // play volume, 0 ~ 255
- }Audio_Set_Volume_Req;
- typedef struct {
- unsigned char echoflag; // echofalg true
- }Audio_Set_Echo_Req;
- typedef struct {
- unsigned char modeflag; // modeflag
- }Audio_Set_Mode_Req;
- typedef struct {
- unsigned char type;
- unsigned char gain;
- }Audio_Set_Gain_Req;
- typedef struct {
- short in_fir_coeffs[45];
- short out_fir_coeffs[45];
- }Audio_Set_LoudSpk_FIR_Coeffs_Req;
- typedef struct {
- unsigned short speech_common_para[12]; // 8 or 12, so at most 12
- }Audio_Set_Speech_Common_Req;
- typedef struct {
- unsigned short speech_loudspk_mode_para[16]; // change from 8 to 16, because at most: 16
- }Audio_Set_LoudSpk_Mode_Req;
- typedef struct {
- unsigned short Media_Playback_Maximum_Swing;
- }Audio_Set_Playback_Maximum_Swing_Req;
- typedef struct {
- short Melody_FIR_Output_Coeff_32k_Tbl1[25];
- }Audio_Set_Melody_FIR_Output_Coeffs_Req;
- typedef struct {
- unsigned short speech_common_para[12];
- unsigned short speech_loudspk_mode_para[16]; // change from 8 to 16, because at most: 16
- }Audio_Set_Speech_Common_And_Mode_Req;
- typedef struct {
- unsigned short fre;
- unsigned char spkgain;
- unsigned char micgain;
- unsigned short ulgain;
- unsigned short dlgain;
- unsigned short amp;
-
- }Audio_Tone_LoopBackRec_Req;
- typedef struct {
- unsigned int buffer[2000];
- }Audio_Tone_LoopBackRec_Cnf;
- typedef struct {
- unsigned int buffer[500];
- }Audio_Tone_LoopBackRec_Cnf_2K;
- typedef struct
- {
- unsigned char m_ucVolume;
- unsigned short m_u2Freq;
- }Audio_Set_Freq_Vol_Tone_Req_T;
- typedef struct
- {
- unsigned char m_ucMode;
- }Audio_Get_Profile_Settings_By_Mode_Req_T;
- typedef struct
- {
- unsigned char mode;
- unsigned char melody[7];
- unsigned char sound[7];
- unsigned char keytone[7];
- unsigned char speech[7];
- unsigned char mic[7];
- unsigned char sidetone;
- unsigned char max_melody_volume_gain;
- unsigned char melody_volume_gain_step;
- unsigned char tv_out_volume_gain[MAX_VOL_LEVEL]; // 7 here
- }Audio_Get_Profile_Settings_By_Mode_Cnf_T;
- typedef struct
- {
- unsigned char mode;
- unsigned char melody[7];
- unsigned char sound[7];
- unsigned char keytone[7];
- unsigned char speech[7];
- unsigned char mic[7];
- unsigned char sidetone;
- unsigned char max_melody_volume_gain;
- unsigned char melody_volume_gain_step;
- unsigned char tv_out_volume_gain[MAX_VOL_LEVEL]; // 7 here
- }Audio_Set_Profile_Settings_By_Mode_Req_T;
- typedef struct
- {
-
- unsigned short m_u2FailReason; // possible fail resons
- }Audio_Set_Profile_Settings_By_Mode_Cnf_T;
- typedef struct
- {
-
- unsigned short m_u2FailReason; // possible fail resons, (2 means the format is not matched with Target side)
- }Audio_Set_Param_Cnf_T;
- //-----------------------------------------------------//
- // Audio Testing: callback function definition //
- //-----------------------------------------------------//
- typedef void (__stdcall *META_AUDIO_QUERY_ID_CNF)(const Audio_Query_ID_Cnf *cnf, const short token, void *usrData);
- typedef void (__stdcall *META_AUDIO_PLAY_CNF)(const AUDIO_RESULT status, const short token, void *usrData);
- typedef void (__stdcall *META_AUDIO_PLAY_BYNAME_CNF)(const AUDIO_RESULT status, const short token, void *usrData);
- typedef void (__stdcall *META_AUDIO_PLAY_IMY_BYBUF_CNF)(const AUDIO_RESULT status, const short token, void *usrData);
- typedef void (__stdcall *META_AUDIO_PLAY_OVER_IND)(const AUDIO_RESULT status, const short token, void *usrData);
- typedef void (__stdcall *META_AUDIO_STOP_CNF)(const AUDIO_RESULT status, const short token, void *usrData);
- typedef void (__stdcall *META_AUDIO_MEDIA_PLAY_CNF)(const AUDIO_RESULT status, const short token, void *usrData);
- typedef void (__stdcall *META_AUDIO_MEDIA_PLAY_OVER_IND)(const AUDIO_RESULT status, const short token, void *usrData);
- typedef void (__stdcall *META_AUDIO_MEDIA_STOP_CNF)(const AUDIO_RESULT status, const short token, void *usrData);
- typedef void (__stdcall *META_AUDIO_SET_VOLUME_CNF)(const AUDIO_RESULT status, const short token, void *usrData);
- //-----------------------------------------------------//
- // Audio Testing: exported function definition //
- //-----------------------------------------------------//
- META_RESULT __stdcall META_Audio_Query_ID(const META_AUDIO_QUERY_ID_CNF cnf_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Query_ID_r(const int meta_handle, const META_AUDIO_QUERY_ID_CNF cnf_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Play(const Audio_Play_Req *req, const META_AUDIO_PLAY_CNF cnf_cb, const META_AUDIO_PLAY_OVER_IND ind_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Play_r(const int meta_handle, const Audio_Play_Req *req, const META_AUDIO_PLAY_CNF cnf_cb, const META_AUDIO_PLAY_OVER_IND ind_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Play_ByName(const Audio_Play_ByName_Req *req, const META_AUDIO_PLAY_BYNAME_CNF cnf_cb, const META_AUDIO_PLAY_OVER_IND ind_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Play_ByName_r(const int meta_handle, const Audio_Play_ByName_Req *req, const META_AUDIO_PLAY_BYNAME_CNF cnf_cb, const META_AUDIO_PLAY_OVER_IND ind_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Play_IMY_ByBuf(const Audio_Play_IMY_ByBuf_Req *req, const META_AUDIO_PLAY_IMY_BYBUF_CNF cnf_cb, const META_AUDIO_PLAY_OVER_IND ind_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Play_IMY_ByBuf_r(const int meta_handle, const Audio_Play_IMY_ByBuf_Req *req, const META_AUDIO_PLAY_IMY_BYBUF_CNF cnf_cb, const META_AUDIO_PLAY_OVER_IND ind_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Stop(const META_AUDIO_STOP_CNF cnf_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Stop_r(const int meta_handle, const META_AUDIO_STOP_CNF cnf_cb, short *token, void *usrData);
- //META_RESULT __stdcall META_Audio_MEDIA_Play(const Audio_MEDIA_Play_Req *req, const META_AUDIO_MEDIA_PLAY_CNF cnf_cb, const META_AUDIO_MEDIA_PLAY_OVER_IND ind_cb, short *token, void *usrData);
- //META_RESULT __stdcall META_Audio_MEDIA_Play_r(const int meta_handle, const Audio_MEDIA_Play_Req *req, const META_AUDIO_MEDIA_PLAY_CNF cnf_cb, const META_AUDIO_MEDIA_PLAY_OVER_IND ind_cb, short *token, void *usrData);
- //META_RESULT __stdcall META_Audio_MEDIA_Stop(const META_AUDIO_MEDIA_STOP_CNF cnf_cb, short *token, void *usrData);
- //META_RESULT __stdcall META_Audio_MEDIA_Stop_r(const int meta_handle, const META_AUDIO_MEDIA_STOP_CNF cnf_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Set_Volume(const Audio_Set_Volume_Req *req, const META_AUDIO_SET_VOLUME_CNF cnf_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Set_Volume_r(const int meta_handle, const Audio_Set_Volume_Req *req, const META_AUDIO_SET_VOLUME_CNF cnf_cb, short *token, void *usrData);
- META_RESULT __stdcall META_Audio_Set_Echo_Loop(unsigned int ms_timeout,const Audio_Set_Echo_Req *req);
- META_RESULT __stdcall META_Audio_Set_Echo_Loop_r(const int meta_handle,unsigned int ms_timeout ,const Audio_Set_Echo_Req *req);
- META_RESULT __stdcall META_Audio_Set_Mode(unsigned int ms_timeout,const Audio_Set_Mode_Req *req);
- META_RESULT __stdcall META_Audio_Set_Mode_r(const int meta_handle,unsigned int ms_timeout ,const Audio_Set_Mode_Req *req);
- META_RESULT __stdcall META_Audio_Set_Gain(unsigned int ms_timeout,const Audio_Set_Gain_Req *req);
- META_RESULT __stdcall META_Audio_Set_Gain_r(const int meta_handle,unsigned int ms_timeout ,const Audio_Set_Gain_Req *req);
- META_RESULT __stdcall META_Audio_Tone_Loop_Back_Rec(unsigned int ms_timeout, Audio_Tone_LoopBackRec_Req *req, Audio_Tone_LoopBackRec_Cnf *cnf);
- META_RESULT __stdcall META_Audio_Tone_Loop_Back_Rec_r(const int meta_handle,unsigned int ms_timeout , Audio_Tone_LoopBackRec_Req *req, Audio_Tone_LoopBackRec_Cnf *cnf);
- // for loud-speaker mode
- META_RESULT __stdcall META_Audio_Tone_Loop_Back_Rec_2K(unsigned int ms_timeout, Audio_Tone_LoopBackRec_Req *req, Audio_Tone_LoopBackRec_Cnf_2K *cnf);
- META_RESULT __stdcall META_Audio_Tone_Loop_Back_Rec_2K_r(const int meta_handle,unsigned int ms_timeout , Audio_Tone_LoopBackRec_Req *req, Audio_Tone_LoopBackRec_Cnf_2K *cnf);
- // for normal mode
- META_RESULT __stdcall META_Audio_Tone_Loop_Back_Rec_2K_Normal(unsigned int ms_timeout, Audio_Tone_LoopBackRec_Req *req, Audio_Tone_LoopBackRec_Cnf_2K *cnf);
- META_RESULT __stdcall META_Audio_Tone_Loop_Back_Rec_2K_Normal_r(const int meta_handle,unsigned int ms_timeout , Audio_Tone_LoopBackRec_Req *req, Audio_Tone_LoopBackRec_Cnf_2K *cnf);
- META_RESULT __stdcall META_Audio_Set_LoudSpk_FIR_Coeffs(unsigned int ms_timeout,const Audio_Set_LoudSpk_FIR_Coeffs_Req *req);
- META_RESULT __stdcall META_Audio_Set_LoudSpk_FIR_Coeffs_r(const int meta_handle, unsigned int ms_timeout,const Audio_Set_LoudSpk_FIR_Coeffs_Req *req);
- META_RESULT __stdcall META_Audio_Set_Speech_Common(unsigned int ms_timeout,const Audio_Set_Speech_Common_Req *req);
- META_RESULT __stdcall META_Audio_Set_Speech_Common_r(const int meta_handle, unsigned int ms_timeout,const Audio_Set_Speech_Common_Req *req);
- META_RESULT __stdcall META_Audio_Set_LoudSpk_Mode(unsigned int ms_timeout,const Audio_Set_LoudSpk_Mode_Req *req);
- META_RESULT __stdcall META_Audio_Set_LoudSpk_Mode_r(const int meta_handle, unsigned int ms_timeout,const Audio_Set_LoudSpk_Mode_Req *req);
- META_RESULT __stdcall META_Audio_Set_Playback_Maximum_Swing(unsigned int ms_timeout,const Audio_Set_Playback_Maximum_Swing_Req *req);
- META_RESULT __stdcall META_Audio_Set_Playback_Maximum_Swing_r(const int meta_handle, unsigned int ms_timeout,const Audio_Set_Playback_Maximum_Swing_Req *req);
- META_RESULT __stdcall META_Audio_Set_Melody_FIR_Output_Coeffs(unsigned int ms_timeout,const Audio_Set_Melody_FIR_Output_Coeffs_Req *req);
- META_RESULT __stdcall META_Audio_Set_Melody_FIR_Output_Coeffs_r(const int meta_handle, unsigned int ms_timeout,const Audio_Set_Melody_FIR_Output_Coeffs_Req *req);
- META_RESULT __stdcall META_Audio_Set_Speech_Common_And_Mode(unsigned int ms_timeout,const Audio_Set_Speech_Common_And_Mode_Req *req);
- META_RESULT __stdcall META_Audio_Set_Speech_Common_And_Mode_r(const int meta_handle, unsigned int ms_timeout,const Audio_Set_Speech_Common_And_Mode_Req *req);
- META_RESULT __stdcall META_Audio_Play_Freq_Vol_Tone(unsigned int ms_timeout,const Audio_Set_Freq_Vol_Tone_Req_T *req);
- META_RESULT __stdcall META_Audio_Play_Freq_Vol_Tone_r(const int meta_handle, unsigned int ms_timeout,const Audio_Set_Freq_Vol_Tone_Req_T *req);
- META_RESULT __stdcall META_Audio_Stop_Freq_Vol_Tone(unsigned int ms_timeout);
- META_RESULT __stdcall META_Audio_Stop_Freq_Vol_Tone_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_Audio_Get_Audio_Profile_Settings(unsigned int ms_timeout,
- Audio_Get_Profile_Settings_By_Mode_Req_T *req,
- Audio_Get_Profile_Settings_By_Mode_Cnf_T *cnf);
- META_RESULT __stdcall META_Audio_Get_Audio_Profile_Settings_r(const int meta_handle,
- unsigned int ms_timeout,
- Audio_Get_Profile_Settings_By_Mode_Req_T *req,
- Audio_Get_Profile_Settings_By_Mode_Cnf_T *cnf);
- META_RESULT __stdcall META_Audio_Set_Audio_Profile_Settings(unsigned int ms_timeout,
- Audio_Set_Profile_Settings_By_Mode_Req_T *req,
- Audio_Set_Profile_Settings_By_Mode_Cnf_T *cnf);
- META_RESULT __stdcall META_Audio_Set_Audio_Profile_Settings_r(const int meta_handle,
- unsigned int ms_timeout,
- Audio_Set_Profile_Settings_By_Mode_Req_T *req,
- Audio_Set_Profile_Settings_By_Mode_Cnf_T *cnf);
- META_RESULT __stdcall META_Audio_Get_Audio_Param_Settings_0809(unsigned int ms_timeout,
- l1audio_param_W0809_T *cnf);
- META_RESULT __stdcall META_Audio_Get_Audio_Param_Settings_0809_r(const int meta_handle,
- unsigned int ms_timeout,
- l1audio_param_W0809_T *cnf) ;
- META_RESULT __stdcall META_Audio_Set_Audio_Param_Settings_0809(unsigned int ms_timeout,
- l1audio_param_W0809_T *req,
- Audio_Set_Param_Cnf_T *cnf);
- META_RESULT __stdcall META_Audio_Set_Audio_Param_Settings_0809_r(const int meta_handle,
- unsigned int ms_timeout,
- l1audio_param_W0809_T *req,
- Audio_Set_Param_Cnf_T *cnf);
- //--------------------------------------------------------------------------//
- // BaseBand Testing //
- //--------------------------------------------------------------------------//
- //-----------------------------------------------------//
- // BaseBand Testing: data structure definition //
- //-----------------------------------------------------//
- typedef struct
- {
- unsigned int addr; // The address of register that is to be read.
- } RegRead_Req;
- typedef struct
- {
- unsigned short value; // The read back value
- unsigned char status; // 0: success, others: read register fail.
- } RegRead_Cnf;
- typedef struct
- {
- unsigned int addr; // The address of register that is to be written.
- unsigned short value; // The value that is to be written.
- } RegWrite_Req;
- typedef struct
- {
- unsigned char status; // 0: success, others: write register fail.
- } RegWrite_Cnf;
- typedef struct
- {
- unsigned char channel; // ADC channel number.
- unsigned short Meacount; // Number of measure times.
- } ADCMeaData_Req;
- typedef struct
- {
- unsigned int value; // ADC value, it a sum value of each measurement data.
- unsigned char status; // 0: success, others: get ADC measurement fail.
- } ADCMeaData_Cnf;
- //-----------------------------------------------------//
- // BaseBand Testing: callback function definition //
- //-----------------------------------------------------//
- typedef void (__stdcall *META_BB_READREG_CNF)(const RegRead_Cnf *result, const short token, void *usrData);
- typedef void (__stdcall *META_BB_WRITEREG_CNF)(const RegWrite_Cnf *result, const short token, void *usrData);
- typedef void (__stdcall *META_BB_ADCGETMEADATA_CNF)(const ADCMeaData_Cnf *result, const short token, void *usrData);
- //-----------------------------------------------------//
- // BaseBand Testing: exported function definition //
- //-----------------------------------------------------//
- META_RESULT __stdcall META_BB_RegRead(const RegRead_Req *req, const META_BB_READREG_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_BB_RegRead_r(const int meta_handle, const RegRead_Req *req, const META_BB_READREG_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_BB_RegWrite(const RegWrite_Req *req, const META_BB_WRITEREG_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_BB_RegWrite_r(const int meta_handle, const RegWrite_Req *req, const META_BB_WRITEREG_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_PMIC_RegRead(unsigned int ms_timeout, const RegRead_Req *req, RegRead_Cnf *cnf);
- META_RESULT __stdcall META_PMIC_RegRead_r(const int meta_handle, unsigned int ms_timeout, const RegRead_Req *req, RegRead_Cnf *cnf);
- META_RESULT __stdcall META_PMIC_RegWrite(unsigned int ms_timeout, const RegWrite_Req *req, RegWrite_Cnf *cnf);
- META_RESULT __stdcall META_PMIC_RegWrite_r(const int meta_handle, unsigned int ms_timeout, const RegWrite_Req *req, RegWrite_Cnf *cnf);
- META_RESULT __stdcall META_BB_ADCGetMeaSumData(const ADCMeaData_Req *req, const META_BB_ADCGETMEADATA_CNF cb, short *token, void *usrData);
- META_RESULT __stdcall META_BB_ADCGetMeaSumData_r(const int meta_handle, const ADCMeaData_Req *req, const META_BB_ADCGETMEADATA_CNF cb, short *token, void *usrData);
- //--------------------------------------------------------------------------//
- // FAT Access //
- //--------------------------------------------------------------------------//
- //-----------------------------------------------------//
- // FAT Access: data structure definition //
- //-----------------------------------------------------//
- typedef enum {
- FAT_OPEN_READ = 0,
- FAT_OPEN_WRITE
- }FAT_OPEN_MODE;
- typedef enum {
- FAT_FIND_FILE = 0,
- FAT_FIND_FILE_RECURSIVE,
- FAT_FIND_DIR_RECURSIVE
- }FAT_FIND_MODE;
- typedef enum {
- FAT12 = 0,
- FAT16,
- FAT32
- }FAT_TYPE;
- typedef struct {
- FAT_TYPE Type;
- unsigned int SectorsPerCluster;
- unsigned int TotalSize;
- unsigned int FreeSpace;
- }FAT_DiskInfo_T;
- typedef struct
- {
- char m_cDriveLetter; // Target FAT disk drive letter such as: 'C'
- char *m_pcfilepath; // File path of the file we intend to write into target FAT
- }FAT_FILE_INFO_REQ_T;
- //-----------------------------------------------------//
- // FAT Access: callback function definition //
- //-----------------------------------------------------//
- typedef int (__stdcall *CALLBACK_META_FAT_PROGRESS)(unsigned char percent, int sent_bytes, int total_bytes, const short token, void *usr_arg);
- //-----------------------------------------------------//
- // FAT Access: exported function definition //
- //-----------------------------------------------------//
- META_RESULT __stdcall META_FAT_Open(const char *fat_filepath, FAT_OPEN_MODE mode, int *fs_handle, short *p_token);
- META_RESULT __stdcall META_FAT_Open_r(const int meta_handle, const char *fat_filepath, FAT_OPEN_MODE mode, int *fs_handle, short *p_token);
- META_RESULT __stdcall META_FAT_Close(int *fs_handle, short *p_token);
- META_RESULT __stdcall META_FAT_Close_r(const int meta_handle, int *fs_handle, short *p_token);
- META_RESULT __stdcall META_FAT_GetFileSize(const int fs_handle, int *filesize, short *p_token);
- META_RESULT __stdcall META_FAT_GetFileSize_r(const int meta_handle, const int fs_handle, int *filesize, short *p_token);
- META_RESULT __stdcall META_FAT_Read(const int fs_handle, char *buf, const int buf_len, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg, short *p_token);
- META_RESULT __stdcall META_FAT_Read_r(const int meta_handle, const int fs_handle, char *buf, const int buf_len, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg, short *p_token);
- META_RESULT __stdcall META_FAT_Write(const int fs_handle, const char *buf, const int buf_len, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg, short *p_token);
- META_RESULT __stdcall META_FAT_Write_r(const int meta_handle, const int fs_handle, const char *buf, const int buf_len, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg, short *p_token);
- META_RESULT __stdcall META_FAT_Read_To_File(const int fs_handle, const char *local_filepath, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg, short *p_token);
- META_RESULT __stdcall META_FAT_Read_To_File_r(const int meta_handle, const int fs_handle, const char *local_filepath, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg, short *p_token);
- META_RESULT __stdcall META_FAT_Write_By_File(const int fs_handle, const char *local_filepath, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg, short *p_token);
- META_RESULT __stdcall META_FAT_Write_By_File_r(const int meta_handle, const int fs_handle, const char *local_filepath, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg, short *p_token);
- META_RESULT __stdcall META_FAT_Delete(const char *fat_filepath, short *p_token);
- META_RESULT __stdcall META_FAT_Delete_r(const int meta_handle, const char *fat_filepath, short *p_token);
- META_RESULT __stdcall META_FAT_Move(const char *fat_filepath, const char *new_fat_filepath, short *p_token);
- META_RESULT __stdcall META_FAT_Move_r(const int meta_handle, const char *fat_filepath, const char *new_fat_filepath, short *p_token);
- META_RESULT __stdcall META_FAT_Find_Start(const char *fat_base_dir, const char *fat_find_pattern, FAT_FIND_MODE find_mode, int *p_find_handle, short *p_token);
- META_RESULT __stdcall META_FAT_Find_Start_r(const int meta_handle, const char *fat_base_dir, const char *fat_find_pattern, FAT_FIND_MODE find_mode, int *p_find_handle, short *p_token);
- META_RESULT __stdcall META_FAT_Find_Head(int find_handle);
- META_RESULT __stdcall META_FAT_Find_Prev(int find_handle);
- META_RESULT __stdcall META_FAT_Find_Next(int find_handle);
- META_RESULT __stdcall META_FAT_Find_GetFileInfo(int find_handle, char *p_filepath, const int filepath_len, int *p_filesize);
- META_RESULT __stdcall META_FAT_Find_Close(int *p_find_handle);
- META_RESULT __stdcall META_FAT_GetDiskInfo(const char DriveLetter, FAT_DiskInfo_T *p_DiskInfo, short *p_token);
- META_RESULT __stdcall META_FAT_GetDiskInfo_r(const int meta_handle, const char DriveLetter, FAT_DiskInfo_T *p_DiskInfo, short *p_token);
- META_RESULT __stdcall META_FAT_RemoveDir(const char *fat_dirpath);
- META_RESULT __stdcall META_FAT_RemoveDir_r(const int meta_handle, const char *fat_dirpath);
- META_RESULT __stdcall META_FAT_CheckEnoughSpace(FAT_FILE_INFO_REQ_T *req);
- META_RESULT __stdcall META_FAT_CheckEnoughSpace_r(const int meta_handle, FAT_FILE_INFO_REQ_T *req);
- //--------------------------------------------------------------------------//
- // WiFi Calibration //
- //--------------------------------------------------------------------------//
- //-----------------------------------------------------//
- // WiFi Calibration: data structure definition //
- //-----------------------------------------------------//
- // WiFi Baseband Chip ID
- #define WIFI_BB_MT5911 0x00000001
- // WiFi RF Chip ID
- #define WIFI_RF_AL2236 0x00000001
- #define WIFI_RF_MAX2827 0x00000002
- typedef enum {
- WIFI_TEST_RATE_1M = 0, /* 1M */
- WIFI_TEST_RATE_2M, /* 2M */
- WIFI_TEST_RATE_5_5M, /* 5.5M */
- WIFI_TEST_RATE_11M, /* 11M */
- WIFI_TEST_RATE_6M, /* 6M */
- WIFI_TEST_RATE_9M, /* 9M */
- WIFI_TEST_RATE_12M, /* 12M */
- WIFI_TEST_RATE_18M, /* 18M */
- WIFI_TEST_RATE_24M, /* 24M */
- WIFI_TEST_RATE_36M, /* 36M */
- WIFI_TEST_RATE_48M, /* 48M */
- WIFI_TEST_RATE_54M, /* 54M */
- WIFI_TEST_RATE_COUNT /* Total count */
- } WiFi_TestRate_E;
- typedef enum {
- WNDRV_HOST_INTERFACE_SDIO = 0
- ,WNDRV_HOST_INTERFACE_HPI
- ,WNDRV_HOST_INTERFACE_SPI
- ,WNDRV_HOST_INTERFACE_CF_MEM
- ,WNDRV_HOST_INTERFACE_CF_IO
- } WiFi_HostInterface_E;
- typedef enum {
- WIFI_TX_ALL_ZEROS,
- WIFI_TX_ALL_ONES,
- WIFI_TX_ALTERNATE_BITS,
- WIFI_TX_PSEUDO_RANDOM
- } WiFi_TestPktTxPattern_E;
- typedef enum {
- WIFI_POWER_MODE_NORMAL,
- WIFI_POWER_MODE_IDLE,
- WIFI_POWER_MODE_SLEEP
- } WiFi_PowerManagementMode_E;
- typedef enum {
- WIFI_RF_RX_TEST_MODE = 1 /* For RF Test use */
- } WiFi_TestPktRxMode_E;
- typedef enum {
- WIFI_RX_ANT_DIVERSITY_AGC, /* AGC based selection */
- WIFI_RX_ANT_DIVERSITY_MPDU, /* MPDU based selection */
- WIFI_RX_ANT_FIXED_0, /* Always 0 */
- WIFI_RX_ANT_FIXED_1 /* Always 1 */
- } WiFi_RxAntSel_E;
- typedef struct {
- unsigned int bb_chip_id;
- char bb_chip_ver[32];
- unsigned int rf_chip_id;
- char rf_chip_ver[32];
- unsigned char support_802_11b;
- unsigned char support_802_11a;
- unsigned char support_802_11g;
- bool eeprom_exist;
- unsigned int eeprom_size;
- WiFi_HostInterface_E host_interface;
- } WiFi_ChipCapability_S;
- typedef struct {
- unsigned int ch_freq; /* Frq, units are kHz */
- WiFi_TestRate_E tx_rate;
- int dbm;
- } WiFi_DBM2DAC_Set_S;
- typedef struct {
- unsigned short tx_gain_dac;
- } WiFi_DBM2DAC_Query_S;
- typedef struct {
- unsigned int ch_freq;/* Frq, units are kHz */
- WiFi_TestRate_E tx_rate;
- unsigned char txAnt; /* 0 for Antenna 0; 1 for Antenna 1 */
- unsigned short tx_gain_dac;
- } WiFi_TestTx_S;
- typedef struct {
- unsigned int ch_freq; /* Frq, units are kHz */
- WiFi_TestRate_E tx_rate;
- unsigned short tx_gain_dac;
- unsigned int pktCount;
- unsigned int pktInterval; /* interval between each Tx Packet */
- unsigned int pktLength; /* 24~1500 */
- WiFi_TestPktTxPattern_E pattern; /* content of the Tx Packet */
- unsigned char txAnt; /* 0 for Antenna 0; 1 for Antenna 1 */
- unsigned char is_short_preamble; /* 0 for long preamble and 1 for short preamble */
- unsigned char mac_header[ 24 ]; /* Frame Ctrl, Duration = 2bytes + 2bytes */
- /* Address 1 = 6 bytes */
- /* Address 2 = 6 bytes */
- /* Address 3 = 6 bytes */
- /* Sequence Ctrl = 2 bytes */
- } WiFi_TestPktTx_S;
- typedef struct {
- unsigned int ch_freq; /* Frq, units are kHz */
- WiFi_TestRate_E tx_rate;
- unsigned short tx_gain_dac;
- unsigned int pktCount;
- unsigned int pktInterval; /* interval between each Tx Packet */
- unsigned int pktLength; /* 24~1500 */
- WiFi_TestPktTxPattern_E pattern; /* content of the Tx Packet */
- unsigned char txAnt; /* 0 for Antenna 0; 1 for Antenna 1 */
- unsigned int txFlags;
- unsigned int targetAlc;
- unsigned char is_short_preamble; /* 0 for long preamble and 1 for short preamble */
- unsigned char mac_header[ 24 ]; /* Frame Ctrl, Duration = 2bytes + 2bytes */
- /* Address 1 = 6 bytes */
- /* Address 2 = 6 bytes */
- /* Address 3 = 6 bytes */
- /* Sequence Ctrl = 2 bytes */
- } WiFi_TestPktTx_Ex_S;
- typedef struct {
- unsigned int pkt_sent_count; /* total num sent */
- unsigned int pkt_sent_acked; /* acked num */
- } WiFi_TxStatus_S;
- typedef struct {
- unsigned int pkt_sent_count; /* total num sent */
- unsigned int pkt_sent_acked; /* acked num */
- unsigned short avgAlc;
- unsigned char cckGainControl;
- unsigned char ofdmGainControl;
- } WiFi_TxStatus_Ex_S;
- typedef struct {
- unsigned int ch_freq; /* Frq, units are kHz */
- WiFi_TestPktRxMode_E mode;
- WiFi_RxAntSel_E rxAnt;
- } WiFi_TestPktRx_S;
- typedef struct {
- unsigned int int_rx_ok_num; /* number of packets that Rx ok from interrupt */
- unsigned int int_crc_err_num; /* number of packets that CRC error from interrupt */
- unsigned int pau_rx_pkt_count; /* number of packets that Rx ok from PAU */
- unsigned int pau_crc_err_count; /* number of packets that CRC error from PAU */
- unsigned int pau_cca_count; /* CCA rising edge count */
- unsigned int pau_rx_fifo_full_count; /* number of lost packets due to FiFo full */
- unsigned int int_long_preamble_num;
- unsigned int int_short_preamble_num;
- unsigned int int_rate_ok_num[ WIFI_TEST_RATE_COUNT ];
- unsigned int int_rate_crc_err_num[ WIFI_TEST_RATE_COUNT ];
- int int_rssi_max;
- int int_rssi_min;
- int int_rssi_mean;
- int int_rssi_variance;
- } WiFi_RxStatus_S;
- typedef struct {
- int ED;
- int OSD;
- int SQ1;
- int SFD;
- int CRC16;
- } WiFi_RxCounter_S;
- typedef struct {
- unsigned int channel_num;
- unsigned char channel_list[64];
- } WiFi_ChannelList_S;
- typedef struct {
- unsigned char country_code[2];
- } WiFi_RegDomain_S;
- typedef struct {
- unsigned int index; // 32bits alignment index, +4
- unsigned int mcr_data32;
- } WiFi_MACReg32_S;
- typedef struct {
- unsigned int index; // 16bits alignment index, +2
- unsigned short mcr_data16;
- } WiFi_MACReg16_S;
- typedef struct {
- unsigned int index; // 8bits alignment index, +1
- unsigned char bbcr_data8;
- } WiFi_BBReg8_S;
- typedef struct {
- unsigned int index; // 16bits alignment index, +2
- unsigned short eeprom_data16;
- } WiFi_EEPROM_S;
- //-----------------------------------------------------//
- // WiFi Calibration: WNDRV SET Functions //
- //-----------------------------------------------------//
- META_RESULT __stdcall META_WiFi_Stop(unsigned int ms_timeout);
- META_RESULT __stdcall META_WiFi_Stop_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_WiFi_ContTx(unsigned int ms_timeout, const WiFi_TestTx_S *req);
- META_RESULT __stdcall META_WiFi_ContTx_r(const int meta_handle, unsigned int ms_timeout, const WiFi_TestTx_S *req);
- META_RESULT __stdcall META_WiFi_LocalFrequencyMeasure(unsigned int ms_timeout, const WiFi_TestTx_S *req);
- META_RESULT __stdcall META_WiFi_LocalFrequencyMeasure_r(const int meta_handle, unsigned int ms_timeout, const WiFi_TestTx_S *req);
- META_RESULT __stdcall META_WiFi_CarrierSuppressionMeasure(unsigned int ms_timeout, const WiFi_TestTx_S *req);
- META_RESULT __stdcall META_WiFi_CarrierSuppressionMeasure_r(const int meta_handle, unsigned int ms_timeout, const WiFi_TestTx_S *req);
- META_RESULT __stdcall META_WiFi_ContPktTx(unsigned int ms_timeout, const WiFi_TestPktTx_S *req);
- META_RESULT __stdcall META_WiFi_ContPktTx_r(const int meta_handle, unsigned int ms_timeout, const WiFi_TestPktTx_S *req);
- META_RESULT __stdcall META_WiFi_ContPktTx_Ex(unsigned int ms_timeout, const WiFi_TestPktTx_Ex_S *req);
- META_RESULT __stdcall META_WiFi_ContPktTx_Ex_r(const int meta_handle, unsigned int ms_timeout, const WiFi_TestPktTx_Ex_S *req);
- META_RESULT __stdcall META_WiFi_SetPowerManagementMode(unsigned int ms_timeout, const WiFi_PowerManagementMode_E mode);
- META_RESULT __stdcall META_WiFi_SetPowerManagementMode_r(const int meta_handle, unsigned int ms_timeout, const WiFi_PowerManagementMode_E mode);
- META_RESULT __stdcall META_WiFi_ContPktRx(unsigned int ms_timeout, const WiFi_TestPktRx_S *req);
- META_RESULT __stdcall META_WiFi_ContPktRx_r(const int meta_handle, unsigned int ms_timeout, const WiFi_TestPktRx_S *req);
- META_RESULT __stdcall META_WiFi_SetRegDomain(unsigned int ms_timeout, const WiFi_RegDomain_S *req);
- META_RESULT __stdcall META_WiFi_SetRegDomain_r(const int meta_handle, unsigned int ms_timeout, const WiFi_RegDomain_S *req);
- META_RESULT __stdcall META_WiFi_SetDbmToDac(unsigned int ms_timeout, const WiFi_DBM2DAC_Set_S *req);
- META_RESULT __stdcall META_WiFi_SetDbmToDac_r(const int meta_handle, unsigned int ms_timeout, const WiFi_DBM2DAC_Set_S *req);
- META_RESULT __stdcall META_WiFi_MACReg32Write(unsigned int ms_timeout, const WiFi_MACReg32_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_MACReg32Write_r(const int meta_handle, unsigned int ms_timeout, const WiFi_MACReg32_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_MACReg16Write(unsigned int ms_timeout, const WiFi_MACReg16_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_MACReg16Write_r(const int meta_handle, unsigned int ms_timeout, const WiFi_MACReg16_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_BBRegWrite(unsigned int ms_timeout, const WiFi_BBReg8_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_BBRegWrite_r(const int meta_handle, unsigned int ms_timeout, const WiFi_BBReg8_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_EEPROM_Write(unsigned int ms_timeout, const WiFi_EEPROM_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_EEPROM_Write_r(const int meta_handle, unsigned int ms_timeout, const WiFi_EEPROM_S *array, unsigned int array_cnt);
- //-----------------------------------------------------//
- // WiFi Calibration: WNDRV QUERY Functions //
- //-----------------------------------------------------//
- META_RESULT __stdcall META_WiFi_QueryTxStatus(unsigned int ms_timeout, WiFi_TxStatus_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryTxStatus_r(const int meta_handle, unsigned int ms_timeout, WiFi_TxStatus_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryTxStatus_Ex(unsigned int ms_timeout, WiFi_TxStatus_Ex_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryTxStatus_Ex_r(const int meta_handle, unsigned int ms_timeout, WiFi_TxStatus_Ex_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryRxStatus(unsigned int ms_timeout, WiFi_RxStatus_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryRxStatus_r(const int meta_handle, unsigned int ms_timeout, WiFi_RxStatus_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryChannelList(unsigned int ms_timeout, WiFi_ChannelList_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryChannelList_r(const int meta_handle, unsigned int ms_timeout, WiFi_ChannelList_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryRxCounter(unsigned int ms_timeout, WiFi_RxCounter_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryRxCounter_r(const int meta_handle, unsigned int ms_timeout, WiFi_RxCounter_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryDbmToDac(unsigned int ms_timeout, WiFi_DBM2DAC_Query_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryDbmToDac_r(const int meta_handle, unsigned int ms_timeout, WiFi_DBM2DAC_Query_S *cnf);
- META_RESULT __stdcall META_WiFi_MACReg32Read(unsigned int ms_timeout, WiFi_MACReg32_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_MACReg32Read_r(const int meta_handle, unsigned int ms_timeout, WiFi_MACReg32_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_MACReg16Read(unsigned int ms_timeout, WiFi_MACReg16_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_MACReg16Read_r(const int meta_handle, unsigned int ms_timeout, WiFi_MACReg16_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_BBRegRead(unsigned int ms_timeout, WiFi_BBReg8_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_BBRegRead_r(const int meta_handle, unsigned int ms_timeout, WiFi_BBReg8_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_EEPROM_Read(unsigned int ms_timeout, WiFi_EEPROM_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_EEPROM_Read_r(const int meta_handle, unsigned int ms_timeout, WiFi_EEPROM_S *array, unsigned int array_cnt);
- META_RESULT __stdcall META_WiFi_DacDcOffsetAutoCalibration(unsigned int ms_timeout, WiFi_DAC_DC_Offset_S *cnf);
- META_RESULT __stdcall META_WiFi_DacDcOffsetAutoCalibration_r(const int meta_handle, unsigned int ms_timeout, WiFi_DAC_DC_Offset_S *cnf);
- //-----------------------------------------------------//
- // WiFi Calibration: Exported Functions //
- //-----------------------------------------------------//
- META_RESULT __stdcall META_WiFi_QueryChipCapability(unsigned int ms_timeout, WiFi_ChipCapability_S *cnf);
- META_RESULT __stdcall META_WiFi_QueryChipCapability_r(const int meta_handle, unsigned int ms_timeout, WiFi_ChipCapability_S *cnf);
- META_RESULT __stdcall META_WiFi_SetMacAddress(unsigned int ms_timeout, const WiFi_MacAddress_S *mac);
- META_RESULT __stdcall META_WiFi_SetMacAddress_r(const int meta_handle, unsigned int ms_timeout, const WiFi_MacAddress_S *mac);
- META_RESULT __stdcall META_WiFi_SetTxPower2400M(unsigned int ms_timeout, const WiFi_TxPower_2400M_S *txpwr);
- META_RESULT __stdcall META_WiFi_SetTxPower2400M_r(const int meta_handle, unsigned int ms_timeout, const WiFi_TxPower_2400M_S *txpwr);
- META_RESULT __stdcall META_WiFi_SetTxPower5000M(unsigned int ms_timeout, const WiFi_TxPower_5000M_S *txpwr);
- META_RESULT __stdcall META_WiFi_SetTxPower5000M_r(const int meta_handle, unsigned int ms_timeout, const WiFi_TxPower_5000M_S *txpwr);
- META_RESULT __stdcall META_WiFi_SetDacDcOffset(unsigned int ms_timeout, const WiFi_DAC_DC_Offset_S *dac_dc_offset);
- META_RESULT __stdcall META_WiFi_SetDacDcOffset_r(const int meta_handle, unsigned int ms_timeout, const WiFi_DAC_DC_Offset_S *dac_dc_offset);
- META_RESULT __stdcall META_WiFi_SetTxALC2400M(unsigned int ms_timeout, const WiFi_TxALC_2400M_S *txalc);
- META_RESULT __stdcall META_WiFi_SetTxALC2400M_r(const int meta_handle, unsigned int ms_timeout, const WiFi_TxALC_2400M_S *txalc);
- //--------------------------------------------------------------------------//
- // BT Calibration //
- //--------------------------------------------------------------------------//
- //-----------------------------------------------------//
- // BT Calibration: data structure definition //
- //-----------------------------------------------------//
- // BT Module ID
- #define BT_NOT_SUPPORT 0x00000000
- #define BTMODULE_MT6601 0x00000011
- #define BTMODULE_MT6611 0x00000012
- #define BTMODULE_RFMD3500 0x00000021
- #define BTMODULE_RFMD4020 0x00000022
- //#define BT_PACKET_LEN 339
- #define BT_PACKET_LEN 1021 // because BT2.0 support at most 1021 bytes per packet
- typedef struct {
- unsigned char id;
- } BT_ModuleID_S;
- typedef struct {
- unsigned char m_event;
- char m_status;
- unsigned short m_handle;
- unsigned char m_len;
- unsigned char m_parms[256];
- } BT_HCI_EVENT;
- typedef struct {
- unsigned short m_opcode;
- unsigned char m_len;
- unsigned char m_cmd[256];
- } BT_HCI_COMMAND;
- typedef struct {
- unsigned short m_con_hdl;
- unsigned short m_len;
- unsigned char m_buffer[BT_PACKET_LEN];
- } BT_HCI_BUFFER;
- typedef struct {
- unsigned short m_len;
- unsigned char m_data[BT_PACKET_LEN];
- } BT_HCI_PACKET;
- typedef struct {
- unsigned short m_con_hdl;
- unsigned short m_len;
- unsigned short m_total_pks;
- } BT_HCI_TX_PURE_TEST;
- typedef struct {
- unsigned int m_used_time;
- unsigned short m_len;
- } BT_HCI_TX_PURE_TEST_STAT;
- typedef struct {
- unsigned int m_used_time;
- unsigned short m_len;
- } BT_HCI_RX_PURE_TEST_STAT;
- typedef struct {
- unsigned int m_u4UsedTime;
- unsigned short m_u2PktSentNum;
-
- } BT_HCI_TX_PURE_TEST_STAT_V2;
- //-----------------------------------------------------//
- // BT Calibration Functions //
- //-----------------------------------------------------//
- META_RESULT __stdcall META_BT_QueryModuleID(unsigned int ms_timeout, BT_ModuleID_S *cnf);
- META_RESULT __stdcall META_BT_QueryModuleID_r(const int meta_handle, unsigned int ms_timeout, BT_ModuleID_S *cnf);
- typedef void (__stdcall *META_BT_HCI_CNF)(const BT_HCI_EVENT *cnf, const short token, void *usrData);
- typedef void (__stdcall *META_BT_HCI_TXDATA_CNF)(const BT_HCI_PACKET *cnf, const short token, void *usrData);
- typedef void (__stdcall *META_BT_AUTO_HCI_CNF)(const BT_HCI_EVENT *cnf, const short token, void *usrData);
- typedef void (__stdcall *META_BT_HCI_RXDATA_CNF)(const BT_HCI_BUFFER *cnf, const short token, void *usrData);
- typedef void (__stdcall *META_BT_HCI_TXTEST_CNF)(const BT_HCI_TX_PURE_TEST_STAT *cnf, const short token, void *usrData);
- typedef void (__stdcall *META_BT_HCI_RXTEST_CNF)(const BT_HCI_RX_PURE_TEST_STAT *cnf, const short token, void *usrData);
- typedef void (__stdcall *META_BT_HCI_TXTEST_V2_CNF)(const BT_HCI_TX_PURE_TEST_STAT_V2 *cnf, const short token, void *usrData);
- typedef struct{
- META_BT_HCI_TXDATA_CNF m_SendDataCallback;
- META_BT_HCI_RXDATA_CNF m_RecvDataCallback;
- META_BT_AUTO_HCI_CNF m_AutoCallback;
- META_BT_HCI_TXTEST_CNF m_TxTestCallback;
- META_BT_HCI_RXTEST_CNF m_RxTestCallback;
- META_BT_HCI_TXTEST_V2_CNF m_TxTestCallback_V2;
- } BT_OtherCallBack;
- META_RESULT __stdcall META_BT_SendHCICommand(unsigned int ms_timeout,BT_HCI_COMMAND *req, META_BT_HCI_CNF cb, void *cb_arg, unsigned char Cmpltcode);
- META_RESULT __stdcall META_BT_SendHCICommand_r(const int meta_handle, unsigned int ms_timeout,BT_HCI_COMMAND *req, META_BT_HCI_CNF cb, void *cb_arg, unsigned char Cmpltcode);
- META_RESULT __stdcall META_BT_CancelHCICommand(unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_CancelHCICommand_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_SendHCIData(unsigned int ms_timeout,BT_HCI_BUFFER *snd, META_BT_HCI_TXDATA_CNF cb_tx, void *cb_arg);
- META_RESULT __stdcall META_BT_SendHCIData_r(const int meta_handle, unsigned int ms_timeout,BT_HCI_BUFFER *snd, META_BT_HCI_TXDATA_CNF cb_tx, void *cb_arg);
- META_RESULT __stdcall META_BT_RegisterAutoCallback(META_BT_AUTO_HCI_CNF cb_auto);
- META_RESULT __stdcall META_BT_RegisterAutoCallback_r(const int meta_handle,META_BT_AUTO_HCI_CNF cb_auto);
- META_RESULT __stdcall META_BT_ReceiveHCIData(META_BT_HCI_RXDATA_CNF cb_rx);
- META_RESULT __stdcall META_BT_ReceiveHCIData_r(const int meta_handle,META_BT_HCI_RXDATA_CNF cb_rx);
- META_RESULT __stdcall META_BT_TxPureTest(unsigned int ms_timeout, BT_HCI_TX_PURE_TEST *snd, META_BT_HCI_TXTEST_CNF cb_tx, void *cb_arg);
- META_RESULT __stdcall META_BT_TxPureTest_r(const int meta_handle, unsigned int ms_timeout, BT_HCI_TX_PURE_TEST *snd, META_BT_HCI_TXTEST_CNF cb_tx, void *cb_arg);
- META_RESULT __stdcall META_BT_RxTestStart(unsigned int ms_timeout, META_BT_HCI_RXTEST_CNF cb_rx);
- META_RESULT __stdcall META_BT_RxTestStart_r(const int meta_handle, unsigned int ms_timeout, META_BT_HCI_RXTEST_CNF cb_rx);
- META_RESULT __stdcall META_BT_RxTestEnd(unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_RxTestEnd_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_TxPureTest_V2(unsigned int ms_timeout, BT_HCI_TX_PURE_TEST *snd, META_BT_HCI_TXTEST_V2_CNF cb_txtest, void *cb_arg);
- META_RESULT __stdcall META_BT_TxPureTest_V2_r(const int meta_handle, unsigned int ms_timeout, BT_HCI_TX_PURE_TEST *snd, META_BT_HCI_TXTEST_V2_CNF cb_txtest, void *cb_arg);
- META_RESULT __stdcall META_BT_RxTestStart_V2(unsigned int ms_timeout, META_BT_HCI_RXTEST_CNF cb_rx);
- META_RESULT __stdcall META_BT_RxTestStart_V2_r(const int meta_handle, unsigned int ms_timeout, META_BT_HCI_RXTEST_CNF cb_rx);
- META_RESULT __stdcall META_BT_EnableNvramOnlineUpdate(unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_EnableNvramOnlineUpdate_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_DisableNvramOnlineUpdate(unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_DisableNvramOnlineUpdate_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_EnablePcmClockSyncSignal(unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_EnablePcmClockSyncSignal_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_DisablePcmClockSyncSignal(unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_DisablePcmClockSyncSignal_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_BT_RemoveAutoCallback();
- META_RESULT __stdcall META_BT_RemoveAutoCallback_r(const int meta_handle);
- META_RESULT __stdcall META_BT_RemoveReceiveHCIDataCallback();
- META_RESULT __stdcall META_BT_RemoveReceiveHCIDataCallback_r(const int meta_handle);
- //----------------------------------------------------------------//
- // FM //
- //----------------------------------------------------------------//
- //--------------------------//
- // FM data structures //
- //--------------------------//
- #define FM_CHIP_ID_MT6189AN 0
- #define FM_CHIP_ID_MT6189BN_CN 1
- #define FM_CHIP_ID_MT6188A 3
- #define FM_CHIP_ID_MT6188C 4
- #define FM_CHIP_ID_MT6188D 5
- typedef struct
- {
- unsigned char m_ucChipId;
- }FM_CHIP_ID_CNF_T;
- typedef struct
- {
- short m_i2CurFreq; // freq range is [875, 1080]
- }FM_FREQ_REQ_T;
- typedef struct
- {
- unsigned char m_ucSignalLevel;
- }FM_RSSI_CNF_T;
- typedef struct
- {
- //unsigned char m_ucIfCnt;
- unsigned short m_u2IfCnt;
-
- }FM_IF_CNT_CNF_T;
- typedef struct
- {
- unsigned short m_u2MonoOrStereo; // 0: mono, 1: stereo
- unsigned short m_u2SblendOnOrOff; // 0: sblend off, 1: sblend on
- unsigned int m_u4ItemValue; // 0: disable, 1: enable
- }FM_MONO_STEREO_BLEND_REQ_T;
- typedef struct // freq range is [875, 1080]
- {
- short m_i2StartFreq; // note: when we try to search next: start freq should <= stop freq
- short m_i2StopFreq; // note: when we try to search prev: start freq should >= stop freq
- }FM_FREQ_RANGE_REQ_T;
- typedef struct
- {
- unsigned char m_ucExit; // 0: don't exist, 1: exist
- short m_i2ValidFreq; // -1: settings error, 0: invalid freq, others: 875-1080 valid
- }FM_VAILD_FREQ_CNF_T;
- typedef struct
- {
- unsigned int m_u4RssiThreshold;
- }FM_RSSI_THRESHOLD_REQ_T;
- typedef struct
- {
- unsigned int m_u4IfCntDelta;
- }FM_IF_CNT_DELTA_REQ_T;
- typedef struct
- {
- unsigned char m_ucAddr;
-
- }FM_READ_BYTE_ADDR_REQ_T;
- typedef struct
- {
- unsigned short m_u2ReadByte;
- }FM_READ_BYTE_CNF_T;
- typedef struct
- {
- unsigned char m_ucAddr;
- unsigned short m_u2WriteByte;
- }FM_WRITE_BYTE_REQ_T;
- typedef struct
- {
- unsigned char m_bOnOff; // 0: off, 1: on
- }FM_SOFT_MUTE_ONOFF_REQ_T;
- typedef struct
- {
- unsigned char m_ucStage; // 1~3
- }FM_STAGE_REQ_T;
- typedef struct
- {
- unsigned char m_ucHighOrLow;
- }FM_HL_Side_CNF_T;
- typedef struct
- {
- unsigned char m_ucStereoOrMono;
- }FM_Stereo_Mono_CNF_T;
- //--------------------------//
- // FM Functions //
- //--------------------------//
- META_RESULT __stdcall META_FM_GetChipId(unsigned int ms_timeout, FM_CHIP_ID_CNF_T *cnf);
- META_RESULT __stdcall META_FM_GetChipId_r(const int meta_handle, unsigned int ms_timeout, FM_CHIP_ID_CNF_T *cnf);
- META_RESULT __stdcall META_FM_PowerOn(unsigned int ms_timeout);
- META_RESULT __stdcall META_FM_PowerOn_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_FM_PowerOff(unsigned int ms_timeout);
- META_RESULT __stdcall META_FM_PowerOff_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_FM_SetFreq(unsigned int ms_timeout, FM_FREQ_REQ_T *req);
- META_RESULT __stdcall META_FM_SetFreq_r(const int meta_handle, unsigned int ms_timeout, FM_FREQ_REQ_T *req);
- META_RESULT __stdcall META_FM_GetRSSI(unsigned int ms_timeout, FM_FREQ_REQ_T *req, FM_RSSI_CNF_T *cnf);
- META_RESULT __stdcall META_FM_GetRSSI_r(const int meta_handle, unsigned int ms_timeout, FM_FREQ_REQ_T *req, FM_RSSI_CNF_T *cnf);
- META_RESULT __stdcall META_FM_GetIfCnt(unsigned int ms_timeout, FM_FREQ_REQ_T *req, FM_IF_CNT_CNF_T *cnf);
- META_RESULT __stdcall META_FM_GetIfCnt_r(const int meta_handle, unsigned int ms_timeout, FM_FREQ_REQ_T *req, FM_IF_CNT_CNF_T *cnf);
- META_RESULT __stdcall META_FM_SearchNextFreq(unsigned int ms_timeout, FM_FREQ_RANGE_REQ_T *req, FM_VAILD_FREQ_CNF_T *cnf);
- META_RESULT __stdcall META_FM_SearchNextFreq_r(const int meta_handle, unsigned int ms_timeout, FM_FREQ_RANGE_REQ_T *req, FM_VAILD_FREQ_CNF_T *cnf);
- META_RESULT __stdcall META_FM_SearchPrevFreq(unsigned int ms_timeout, FM_FREQ_RANGE_REQ_T *req, FM_VAILD_FREQ_CNF_T *cnf);
- META_RESULT __stdcall META_FM_SearchPrevFreq_r(const int meta_handle, unsigned int ms_timeout, FM_FREQ_RANGE_REQ_T *req, FM_VAILD_FREQ_CNF_T *cnf);
- META_RESULT __stdcall META_FM_SetMonoOrStereo_Blend(unsigned int ms_timeout, FM_MONO_STEREO_BLEND_REQ_T *req);
- META_RESULT __stdcall META_FM_SetMonoOrStereo_Blend_r(const int meta_handle, unsigned int ms_timeout, FM_MONO_STEREO_BLEND_REQ_T *req);
- META_RESULT __stdcall META_FM_SetRssiThreold(unsigned int ms_timeout, FM_RSSI_THRESHOLD_REQ_T *req);
- META_RESULT __stdcall META_FM_SetRssiThreold_r(const int meta_handle, unsigned int ms_timeout, FM_RSSI_THRESHOLD_REQ_T *req);
- META_RESULT __stdcall META_FM_SetIfCntDelta(unsigned int ms_timeout, FM_IF_CNT_DELTA_REQ_T *req);
- META_RESULT __stdcall META_FM_SetIfCntDelta_r(const int meta_handle, unsigned int ms_timeout, FM_IF_CNT_DELTA_REQ_T *req);
- META_RESULT __stdcall META_FM_ReadByte(unsigned int ms_timeout, FM_READ_BYTE_ADDR_REQ_T *req, FM_READ_BYTE_CNF_T *cnf);
- META_RESULT __stdcall META_FM_ReadByte_r(const int meta_handle, unsigned int ms_timeout, FM_READ_BYTE_ADDR_REQ_T *req, FM_READ_BYTE_CNF_T *cnf);
- META_RESULT __stdcall META_FM_WriteByte(unsigned int ms_timeout, FM_WRITE_BYTE_REQ_T *req);
- META_RESULT __stdcall META_FM_WriteByte_r(const int meta_handle, unsigned int ms_timeout, FM_WRITE_BYTE_REQ_T *req);
- META_RESULT __stdcall META_FM_SetSoftMute(unsigned int ms_timeout, FM_SOFT_MUTE_ONOFF_REQ_T *req);
- META_RESULT __stdcall META_FM_SetSoftMute_r(const int meta_handle, unsigned int ms_timeout, FM_SOFT_MUTE_ONOFF_REQ_T *req);
- META_RESULT __stdcall META_FM_SelectSoftMuteStage(unsigned int ms_timeout, FM_STAGE_REQ_T *req);
- META_RESULT __stdcall META_FM_SelectSoftMuteStage_r(const int meta_handle, unsigned int ms_timeout, FM_STAGE_REQ_T *req);
- META_RESULT __stdcall META_FM_SelectSBlendStage(unsigned int ms_timeout, FM_STAGE_REQ_T *req);
- META_RESULT __stdcall META_FM_SelectSBlendStage_r(const int meta_handle, unsigned int ms_timeout, FM_STAGE_REQ_T *req);
- META_RESULT __stdcall META_FM_GetHighOrLowSide(unsigned int ms_timeout, FM_FREQ_REQ_T *req, FM_HL_Side_CNF_T *cnf);
- META_RESULT __stdcall META_FM_GetHighOrLowSide_r(const int meta_handle, unsigned int ms_timeout, FM_FREQ_REQ_T *req, FM_HL_Side_CNF_T *cnf);
- META_RESULT __stdcall META_FM_GetStereoOrMono(unsigned int ms_timeout, FM_Stereo_Mono_CNF_T *cnf);
- META_RESULT __stdcall META_FM_GetStereoOrMono_r(const int meta_handle, unsigned int ms_timeout, FM_Stereo_Mono_CNF_T *cnf);
- //----------------------------------------------------------------//
- // TDMB //
- //----------------------------------------------------------------//
- //--------------------------//
- // TDMB data structures //
- //--------------------------//
- typedef enum { // ref from TDMB
- META_TDMB_KOREA_BAND=1,
- META_TDMB_BAND_III,
- META_TDMB_L_BAND,
- META_TDMB_CANADA_BAND,
- META_TDMB_CHINESE_BAND,
- META_TDMB_BAND_II,
- META_TDMB_BAND_IF,
- META_TDMB_UNDEF_BAND
- } META_TDMB_BAND_enum;
- typedef struct
- {
- META_TDMB_BAND_enum m_rBand;
-
- }TDMB_SET_BAND_REQ_T;
- typedef struct
- {
- unsigned int m_u4Freq;
- }TDMB_SET_FREQ_REQ_T;
- typedef struct
- {
- unsigned char m_ucFreqNum;
- unsigned int m_u4Freq[10];
-
- }TDMB_AUTO_SCAN_CNF_T;
- // ======== for Ensemble ========
- typedef struct
- {
- //TDMB_DBSTATE DB;
- unsigned char m_ucStateNum;
- unsigned int m_u4State[10];
- unsigned int Type; //DMB,DAB,DATA
- unsigned int Id;
- unsigned int BitRate;
- unsigned char PL; //Protection Level
- unsigned char Reg[8];
- unsigned short UserApplType; // added by KST 2006.07.20
- unsigned int TMId;
- unsigned int ASCTy_DSCTy;
- unsigned int SCId;
- unsigned int PackAdd;
- unsigned int DG_MFflag;
- unsigned int Primary;
- unsigned int CAflag;
- unsigned int Language;
- char SCLabel[16];
-
- //TDMB_SvcComponentInfo *pSvcComp;
- unsigned char SvcComp_Order; // 4bits
- unsigned char SvcComp_TMId; // 2bits Transport Mechanism Id
- unsigned char SvcComp_ASCTy_DSCTy; // 6bits Audio Service Component Type
- unsigned char SvcComp_SubCh_FIDCId; // 6bits SubChId or FIDCId in FIG 0/4
- unsigned int SvcComp_SId; // 16bit
- unsigned char SvcComp_CAflag; // 1bit CA Flag
- unsigned char SvcComp_DG_MFflag; // 1bit DG Flag or MF flag
- unsigned char SvcComp_Language; // 8bit
- unsigned char SvcComp_SCIdS; // 4bit Service component Identifier within ther Service
- // kal_uint8 SvcCompLabel[16];// 16bytes Service component Label
- unsigned short SvcComp_SCId; // 12bits Service Component Id
- unsigned short SvcComp_PackAdd; // 10bits Packet Address
- unsigned short SvcComp_SCCA; // 16bits Service Component Conditional Access
- //TDMB_SubChInfo *pSubCh;
- unsigned char SubChId; // 6bits Sub channel Id
- unsigned char TblIndex; // 6bits TableIndex
- unsigned char Form_Opt_Prot; //[3] : FormFlag //[2] : Option//[1~0] : protection
- unsigned short StrtAdd; // 10bits Start Address
- unsigned short SubChSize; // 10bits Sub channel size
- unsigned int Tag;
- // void* Link;
- }TDMB_CHANNELDB_T;
- typedef struct
- {
- // TDMB_DBSTATE
- unsigned char m_ucStateNum;
- unsigned int m_u4State[10];
- unsigned int Id;
- char Label[20];
- //TDMB_ServiceInfo *pService;
- unsigned int SId; // 32bits
- unsigned char SvcLabel[16]; // 16bytes Service Label(Program service and Data service)
- unsigned short CharacterFlag;
- unsigned char CAId; // 3bit
- unsigned char NumSvcComp; // 4bits Number of Service Component
- //TDMB_CHANNELDB *Channel;
- unsigned char m_ucChannelDBNum;
- TDMB_CHANNELDB_T m_rChannelDB[10];
- //struct _TDMB_SERVICEDB *Next;
- unsigned int Tag;
- unsigned int ChannelCount;
- // void* Link;
- }TDMB_SERVICEDB_T;
- typedef struct
- {
- // TDMB_DBSTATE
- unsigned char m_ucStateNum;
- unsigned int m_u4State[10];
- unsigned int Band;
- unsigned int Frequency;
- unsigned short Id;
- unsigned int SvcNum;
- unsigned int SvcCompNum;
- unsigned int SubChNum;
- char Label[20];
- // TDMB_EnsembleInfo
- unsigned char AlFlag; // 1bit Al flag
- unsigned char NumSubCh;
- unsigned char NumSvc;
- unsigned char NumProgram;
- unsigned char NumSvcComp;
- unsigned char NumUserApp;
- unsigned char NumAnn;
- unsigned char NumProgType;
- unsigned char EnsemLabel[16]; // 16bytes Ensemble Label
- unsigned short CharacterFlag;
- unsigned short EId; // 16bits country Id Ensemble reference
- // TDMB_SERVICEDB[]
- unsigned char m_ucServiceDBNum;
- TDMB_SERVICEDB_T m_rServiceDB[10];
- }TDMB_ENSEMBLEDB_T;
- typedef struct // for META APP
- {
- unsigned char m_ucEnsembleNum;
- TDMB_ENSEMBLEDB_T m_rEnsembleDB[10];
- }TDMB_GET_ENSM_INFO_BY_AUTO_SCAN_CNF_T;
- typedef struct // for META APP
- {
- char m_cResult; // 0: success,
- // 1: the band not exist ==> META_TDMB_ERR_BAND_NOT_EXIST
- // 2: frequency not exist ==> META_TDMB_ERR_FREQ_NOT_EXIST
- unsigned char m_ucEnsembleNum;
- TDMB_ENSEMBLEDB_T m_rEnsembleDB[10];
- TDMB_ENSEMBLEDB_T m_rCurEnsembleDB;
- }TDMB_SET_FREQ_CNF_T;
- typedef struct
- {
- unsigned short m_u2Snr;
- unsigned short m_u2PostBer; // not provided so far, so return 0
- unsigned short m_u2PreBer;
- unsigned short m_u2RSSI;
- }TDMB_GET_SIGNAL_CNF_T;
- typedef struct
- {
- unsigned int m_u4ServiceId;
- unsigned int m_u4SubChnId;
- char *m_pcfilepath; // store the TS stream data to this file
- }TDMB_SEL_SERVICE_REQ_T;
- typedef struct
- {
- unsigned int m_u4ServiceId;
- unsigned int m_u4SubChnId;
- }TDMB_SEL_SERVICE_ONLY_REQ_T;
- typedef struct // for Meta APP only
- {
- unsigned char m_ucEnsembleNum;
- TDMB_ENSEMBLEDB_T m_rEnsembleDB[10];
- TDMB_ENSEMBLEDB_T m_rCurEnsembleDB;
- }TDMB_GET_ENSM_CNF_T;
- // --------------------------//
- // TDMB callback //
- // --------------------------//
- typedef enum
- {
- TDMB_FAT_DISK_FULL = 0
- ,TDMB_FAT_UNKNOWN_WRITE_ERROR
- }TDMB_SEL_SERV_ERROR_RESULT;
- typedef void (__stdcall *META_TDMB_SEL_SERV_CNF)(const TDMB_SEL_SERV_ERROR_RESULT status);
- //--------------------------//
- // TDMB Functions //
- //--------------------------//
- META_RESULT __stdcall META_TDMB_TurnOn(unsigned int ms_timeout);
- META_RESULT __stdcall META_TDMB_TurnOn_r(const int meta_handle, unsigned int ms_timeout);
- // send band may return: META_TDMB_ERR_BAND_NOT_EXIST, META_SUCCESS, META_FAILED
- META_RESULT __stdcall META_TDMB_SetBand(unsigned int ms_timeout, TDMB_SET_BAND_REQ_T *req);
- META_RESULT __stdcall META_TDMB_SetBand_r(const int meta_handle, unsigned int ms_timeout, TDMB_SET_BAND_REQ_T *req);
- META_RESULT __stdcall META_TDMB_AutoScan_GetFreq(unsigned int ms_timeout, TDMB_AUTO_SCAN_CNF_T *cnf);
- META_RESULT __stdcall META_TDMB_AutoScan_GetFreq_r(const int meta_handle, unsigned int ms_timeout, TDMB_AUTO_SCAN_CNF_T *cnf);
- META_RESULT __stdcall META_TDMB_SetFreq(unsigned int ms_timeout, TDMB_SET_FREQ_REQ_T *req, TDMB_SET_FREQ_CNF_T *cnf);
- META_RESULT __stdcall META_TDMB_SetFreq_r(const int meta_handle, unsigned int ms_timeout, TDMB_SET_FREQ_REQ_T *req, TDMB_SET_FREQ_CNF_T *cnf);
- META_RESULT __stdcall META_TDMB_AutoScan_GetEnsemble(unsigned int ms_timeout, TDMB_GET_ENSM_INFO_BY_AUTO_SCAN_CNF_T *cnf);
- META_RESULT __stdcall META_TDMB_AutoScan_GetEnsemble_r(const int meta_handle, unsigned int ms_timeout, TDMB_GET_ENSM_INFO_BY_AUTO_SCAN_CNF_T *cnf);
- META_RESULT __stdcall META_TDMB_GetSignal(unsigned int ms_timeout, TDMB_GET_SIGNAL_CNF_T *cnf);
- META_RESULT __stdcall META_TDMB_GetSignal_r(const int meta_handle, unsigned int ms_timeout, TDMB_GET_SIGNAL_CNF_T *cnf);
- //META_RESULT __stdcall META_TDMB_SelService(unsigned int ms_timeout, TDMB_SEL_SERVICE_REQ_T *req);
- //META_RESULT __stdcall META_TDMB_SelService_r(const int meta_handle, unsigned int ms_timeout, TDMB_SEL_SERVICE_REQ_T *req);
- META_RESULT __stdcall META_TDMB_SelService(unsigned int ms_timeout, TDMB_SEL_SERVICE_REQ_T *req, const META_TDMB_SEL_SERV_CNF cnf_cb);
- META_RESULT __stdcall META_TDMB_SelService_r(const int meta_handle, unsigned int ms_timeout, TDMB_SEL_SERVICE_REQ_T *req, const META_TDMB_SEL_SERV_CNF cnf_cb);
- //META_RESULT __stdcall META_TDMB_SetIdle(unsigned int ms_timeout);
- //META_RESULT __stdcall META_TDMB_SetIdle_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_TDMB_SetIdle(unsigned int ms_timeout, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg);
- META_RESULT __stdcall META_TDMB_SetIdle_r(const int meta_handle, unsigned int ms_timeout, CALLBACK_META_FAT_PROGRESS cb_progress, void *cb_progress_arg);
- META_RESULT __stdcall META_TDMB_TurnOff(unsigned int ms_timeout);
- META_RESULT __stdcall META_TDMB_TurnOff_r(const int meta_handle, unsigned int ms_timeout);
- META_RESULT __stdcall META_TDMB_GetEnsm(unsigned int ms_timeout, TDMB_GET_ENSM_CNF_T *cnf);
- META_RESULT __stdcall META_TDMB_GetEnsm_r(const int meta_handle, unsigned int ms_timeout, TDMB_GET_ENSM_CNF_T *cnf);
- META_RESULT __stdcall META_TDMB_SelServiceOnly( unsigned int ms_timeout, TDMB_SEL_SERVICE_ONLY_REQ_T *req);
- META_RESULT __stdcall META_TDMB_SelServiceOnly_r(const int meta_handle, unsigned int ms_timeout, TDMB_SEL_SERVICE_ONLY_REQ_T *);
- #ifdef __cplusplus
- }
- #endif
- #endif