📄 meta.h
字号:
// 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;
// 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;
//-----------------------------------------------------//
// 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_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_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_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);
// 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_GetAllCha
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -