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

📄 dxapi.h

📁 一个通过串口连接手机发短信的程序。
💻 H
📖 第 1 页 / 共 4 页
字号:
//file name :dxapi.h 
//author: weirenhui 
//date: 2004.06.19
//version 0.1
// Copyright  20040627 Daxiantelecom Ldt. 
//
#include "TTPSigDef.h"
#ifndef __DXAPI_H__
#define __DXAPI_H__

#include "DxType.h"

#ifdef _MAC
#undef 
#undef AFX_EXT_CLASS
#define 
#define AFX_EXT_CLASS
#endif


/////////////////////////////type defined//////////////////////////////////////
typedef enum TypeValueTag{
	DX_UINT8,
	DX_SINT8,
	DX_UINT16,
	DX_SINT16,
	DX_UINT32,
	DX_SINT32,
	DX_UNKNOW
}
TypeValue;
typedef signed short L1Rssi;
typedef enum RssiModeTag
{
   DM_RSSI_NORMAL,      /* reading at DSP with accurate gain table applied *
                         * - this gives calculated level at input to radio */
   DM_RSSI_I_OFFSET,
   DM_RSSI_Q_OFFSET,
   DM_RSSI_NO_ACC_GAIN,  /* reading at DSP without accurate gain table applied
                         * - this gives measured level at input to DSP */
   DM_CAL_I_DCOFFSET0,
   DM_CAL_Q_DCOFFSET0,
   DM_CAL_I_DCOFFSET1,
   DM_CAL_Q_DCOFFSET1,
   DM_RSSI_NO_FREQ_CORR

}
RssiMode;

typedef enum FreqOffResultTag
{
   FO_NOT_MEASURED,
   FO_CW_DETECTED,
   FO_GSM_FB_DETECTED
}
FreqOffResult;

typedef enum GainProgramModeTag
{
    GAIN_CODE_WRITE,
    GAIN_CODE_READ,
    ACCURATE_GAIN_WRITE,
    ACCURATE_GAIN_READ
} 
GainProgramMode;

typedef enum BurstModeTag
{
   DM_BURST_OFF,
   DM_BURST_SINGLE_SHOT,
   DM_BURST_CONTINUOUS
}
BurstMode;

typedef enum Burst2TypeTag
{
   RECEIVE_BURST,
   RACH_BURST,
   NORMAL_BURST,
   NORMAL_BURST_RANDOM,
   RECEIVE_BURST_8PSK,
   NORMAL_BURST_8PSK,
   NORMAL_BURST_RANDOM_8PSK
}
Burst2Type;

typedef enum RxControlModeTag
{
    RX_POWER_UP_RADIO,
    RX_POWER_DOWN_RADIO,
    RX_RECEIVER_ON,
    RX_RECEIVER_OFF,
    RX_SEND_SYNTH_VALUE,
    RX_SET_STATIC_SYNTH_VALUE
} 
RxControlMode;

typedef enum BandTag
{
    /* RR uses these to index cell information from an array dimensioned to NUM_BANDS. Therefore
    ** they must be kept in the same order */
    GSM_BAND        = 0,
    DCS_BAND        = 1,
    PCS_BAND        = 2,
    EGSM_BAND       = 3,
#if defined (UPGRADE_MORE_BANDS)
    GSM_450_BAND    = 4,
    GSM_480_BAND    = 5,
    GSM_850_BAND    = 6,


      
#endif
    NUM_BANDS,



      
    INVALID_BAND    = 0xFF
}
Band;

/* The various modes supported. NOte that PCS modes are last to aid RR in distinguishing between
** DCS and PCS bands */


/* BandMode is a bitmap of requested bands or sub-bands*/
#define PGSM_BAND_BIT           0x0001   /* (1 << GSM_BAND)  */
#define DCS_BAND_BIT            0x0002   /* (1 << DCS_BAND)  */
#define PCS_BAND_BIT            0x0004   /* (1 << PCS_BAND)  */
#define EGSM_EXTRA_BAND_BIT     0x0008   /* (1 << EGSM_BAND) */
#define EGSM_BAND_BITS          (PGSM_BAND_BIT + EGSM_EXTRA_BAND_BIT)
#define GSM450_EXTRA_BAND_BIT   0x0010   /* Only 450Mhz supported in GSM400 band */
#define GSM480_EXTRA_BAND_BIT   0x0020   /* Only 480Mhz supported in GSM400 band */
#define GSM400_EXTRA_BAND_BITS  (GSM450_EXTRA_BAND_BIT + GSM480_EXTRA_BAND_BIT)  /* Both GSM400 bands supported i.e. 450_480 */

#define GSM850_BAND_BIT         0x0040   /* GSM850 supported */
#define GSM750_BAND_BIT         0x0080   /* GSM750 supported */

#define UMTS_BAND_BIT           0x0100   /* UMTS supported */

#define BAND_LOCK_BIT           0x0200   /* Used to disable auto-band select i.e. lock the MS to a given band(s) */

typedef enum BandModeTag
{
    PGSM_MODE           = PGSM_BAND_BIT,                   /* Autoband enabled */
    EGSM_MODE           = EGSM_BAND_BITS,                  /* Autoband enabled */
    DCS_MODE            = DCS_BAND_BIT,                    /* Autoband enabled */
    PGSM_DCS_MODE       = PGSM_BAND_BIT  + DCS_BAND_BIT,   /* Autoband enabled */
    EGSM_DCS_MODE       = EGSM_BAND_BITS + DCS_BAND_BIT,   /* Autoband enabled */
    PCS_MODE            = PCS_BAND_BIT,                    /* Autoband enabled */
    PGSM_PCS_MODE       = PGSM_BAND_BIT  + PCS_BAND_BIT,   /* Autoband enabled */
    EGSM_PCS_MODE       = EGSM_BAND_BITS + PCS_BAND_BIT,   /* Autoband enabled */

    PGSM_PCS_MODE_LOCK  = PGSM_BAND_BIT  + PCS_BAND_BIT + BAND_LOCK_BIT,  /* LOCK the MS to PGSM/PCS mode. Autoband DISABLED. For use in testing and 900/1900 countries only */
    EGSM_PCS_MODE_LOCK  = EGSM_BAND_BITS + PCS_BAND_BIT + BAND_LOCK_BIT,  /* LOCK the MS to EGSM/PCS mode. Autoband DISABLED. For use in testing and 900/1900 countries only */
    EGSM_DCS_MODE_LOCK  = EGSM_BAND_BITS + DCS_BAND_BIT + BAND_LOCK_BIT,  /* LOCK the MS to EGSM/DCS mode. Autoband DISABLED. For use in testing and 900/1800 countries only */
    DCS_MODE_LOCK       = DCS_BAND_BIT + BAND_LOCK_BIT,                   /* LOCK the MS to DCS mode. Autoband DISABLED. For use in testing only */
    PCS_MODE_LOCK       = PCS_BAND_BIT + BAND_LOCK_BIT,                   /* LOCK the MS to PCS mode. Autoband DISABLED. For use in testing only */
    EGSM_MODE_LOCK      = EGSM_BAND_BITS + BAND_LOCK_BIT,                 /* LOCK the MS to EGSM mode. Autoband DISABLED. For use in testing only */

#if defined (UPGRADE_MORE_BANDS)
    /* Band mode for GSM850 support */
    GSM850_MODE         = GSM850_BAND_BIT,                                          /* Autoband enabled */
    GSM850_PCS_MODE     = GSM850_BAND_BIT + PCS_BAND_BIT,                           /* Autoband enabled */

    GSM850_DCS_MODE         = GSM850_BAND_BIT + DCS_BAND_BIT,                       /* Autoband enabled */
    GSM850_GSM450_MODE      = GSM850_BAND_BIT + GSM450_EXTRA_BAND_BIT,
    GSM850_GSM450_PCS_MODE  = GSM850_BAND_BIT + GSM450_EXTRA_BAND_BIT + PCS_BAND_BIT,  /* Autoband enabled */
    GSM850_GSM480_MODE      = GSM850_BAND_BIT + GSM480_EXTRA_BAND_BIT,                 /* Autoband enabled */
    GSM850_GSM480_PCS_MODE  = GSM850_BAND_BIT + GSM480_EXTRA_BAND_BIT + PCS_BAND_BIT,  /* Autoband enabled */

    GSM850_GSM400_MODE      = GSM850_BAND_BIT + GSM450_EXTRA_BAND_BIT + GSM480_EXTRA_BAND_BIT,                    /* Autoband enabled */
    GSM850_GSM400_PCS_MODE  = GSM850_BAND_BIT + GSM450_EXTRA_BAND_BIT + GSM480_EXTRA_BAND_BIT + PCS_BAND_BIT,     /* Autoband enabled */

    /* The extra band modes for GSM400 support. First, the GSM450 band */
    PGSM450_MODE        = PGSM_BAND_BIT + GSM450_EXTRA_BAND_BIT,                                                  /* Autoband enabled */
    EGSM450_MODE        = EGSM_BAND_BITS + GSM450_EXTRA_BAND_BIT,                                                 /* Autoband enabled */
    PGSM450_DCS_MODE    = PGSM_BAND_BIT + GSM450_EXTRA_BAND_BIT + DCS_BAND_BIT,                                   /* Autoband enabled */
    EGSM450_DCS_MODE    = EGSM_BAND_BITS + GSM450_EXTRA_BAND_BIT + DCS_BAND_BIT,                                  /* Autoband enabled */
    PGSM450_PCS_MODE    = PGSM_BAND_BIT + GSM450_EXTRA_BAND_BIT + PCS_BAND_BIT,                                   /* Autoband enabled */
    EGSM450_PCS_MODE    = EGSM_BAND_BITS + GSM450_EXTRA_BAND_BIT + PCS_BAND_BIT,                                  /* Autoband enabled */

    /* GSM480 band */
    PGSM480_MODE        = PGSM_BAND_BIT + GSM480_EXTRA_BAND_BIT,                                                  /* Autoband enabled */
    EGSM480_MODE        = EGSM_BAND_BITS + GSM480_EXTRA_BAND_BIT,                                                 /* Autoband enabled */
    PGSM480_DCS_MODE    = PGSM_BAND_BIT + GSM480_EXTRA_BAND_BIT + DCS_BAND_BIT,                                   /* Autoband enabled */
    EGSM480_DCS_MODE    = EGSM_BAND_BITS + GSM480_EXTRA_BAND_BIT + DCS_BAND_BIT,                                  /* Autoband enabled */
    PGSM480_PCS_MODE    = PGSM_BAND_BIT + GSM480_EXTRA_BAND_BIT + PCS_BAND_BIT,                                   /* Autoband enabled */
    EGSM480_PCS_MODE    = EGSM_BAND_BITS + GSM480_EXTRA_BAND_BIT + PCS_BAND_BIT,                                  /* Autoband enabled */

    /* GSM450 and GSM480 bands */
    PGSM400_MODE          = PGSM_BAND_BIT + GSM400_EXTRA_BAND_BITS,                                                 /* Autoband enabled */
    EGSM400_MODE          = EGSM_BAND_BITS + GSM400_EXTRA_BAND_BITS,                                                /* Autoband enabled */
    PGSM400_DCS_MODE      = PGSM_BAND_BIT + GSM400_EXTRA_BAND_BITS + DCS_BAND_BIT,                                  /* Autoband enabled */
    EGSM400_DCS_MODE      = EGSM_BAND_BITS + GSM400_EXTRA_BAND_BITS + DCS_BAND_BIT,                                 /* Autoband enabled */
    PGSM400_PCS_MODE      = PGSM_BAND_BIT + GSM400_EXTRA_BAND_BITS + PCS_BAND_BIT,                                  /* Autoband enabled */
    EGSM400_PCS_MODE      = EGSM_BAND_BITS + GSM400_EXTRA_BAND_BITS + PCS_BAND_BIT,                                 /* Autoband enabled */

    GSM850_MODE_LOCK       = GSM850_BAND_BIT + BAND_LOCK_BIT,                                           /* LOCK the MS to GSM850 mode. Autoband DISABLED. For use in testing only */
    GSM850_DCS_MODE_LOCK   = GSM850_BAND_BIT + DCS_BAND_BIT + BAND_LOCK_BIT,                            /* LOCK the MS to GSM850/DCS1800 mode. Autoband DISABLED. For use in testing and 850/1800 countries only */
    PGSM400_PCS_MODE_LOCK  = PGSM_BAND_BIT + GSM400_EXTRA_BAND_BITS + PCS_BAND_BIT + BAND_LOCK_BIT,     /* LOCK the MS to GSM400/PCS1900 mode. Autoband DISABLED. For use in testing and 400/1900 countries only */
    EGSM400_PCS_MODE_LOCK  = EGSM_BAND_BITS + GSM400_EXTRA_BAND_BITS + PCS_BAND_BIT + BAND_LOCK_BIT,    /* LOCK the MS to EGSM850/PCS1900 mode. Autoband DISABLED. For use in testing and 400/1900 countries only */
#endif



      

    INVALID_BAND_MODE   = 0xffff
}
BandMode;

typedef enum LoopBackModeTag
{
	START_LOOPBACK,
	STOP_LOOPBACK,
    CHANGE_LOOPBACK_PARAMS
}
LoopBackMode;

typedef enum NvControlTag
{
  NV_CONT_USE_DATA,      /* read/write data passed in signal                       */
  NV_CONT_USE_POINTER,   /* read/write data to/from pointer passed in signal       */
  NV_CONT_GET_POINTER,   /* return pointer to access data item directly, no buffer */
  NV_CONT_EXT_DATA       /* read/write data passed in signal ( multiple blocks )   */
}
NvControl;

/* Calibration Data Indentifiers */
typedef enum CalDataIdtag
{
 CAL_CFGAINCONTROLCODETABLE,    /* used for cfGainControlCodeTable    */
 CAL_CFACCURATERADIOGAINTABLE,  /* used for cfAccurateRadioGainTable  */
 CAL_CFEGSMRSSICORRECTIONTABLE, /* used for cfEgsmRssiCorrectionTable */
 CAL_CFGSMRSSICORRECTIONTABLE,  /* used for cfGsmRssiCorrectionTable  */
 CAL_CFDCSRSSICORRECTIONTABLE,  /* used for cfDcsRssiCorrectionTable  */
 CAL_CFPCSRSSICORRECTIONTABLE,  /* used for cfPcsRssiCorrectionTable  */

//#if defined( UPGRADE_MORE_BANDS )
/* #0205-17761 */
 CAL_CFGSM450RSSICORRECTIONTABLE,  /* used for cfGsmRssiCorrectionTable  */
 CAL_CFGSM480RSSICORRECTIONTABLE,  /* used for cfGsmRssiCorrectionTable  */
 CAL_CFGSM850RSSICORRECTIONTABLE,  /* used for cfGsmRssiCorrectionTable  */
//#endif
 /* AFC Calibration data */
 CAL_CFAFCDACDATA,              /* used for cfAfrDacDataPtr           */

 /* Power Config Calibration data*/
 CAL_CFRAMPFACTORTABLE,         /* used for l1CfgRampFactorTable      */


      
 CAL_CFTXFREQCOMPENSATION,      /* used for l1CfgTxFreqCompensation   */

 /* Radio DC Offset calibration data */
 CAL_CFRFDCOFFSET,

 /* Audio Calibration data*/
 CAL_CFMAINSPEAKERCONFIGTABLE,  /* used for cfMainSpeakerConfigTable  */
 CAL_CFAUXSPEAKERCONFIGTABLE,   /* used for cfAuxSpeakerConfigTable   */
 CAL_CFAUDIOOUTPUT0CONFIGTABLE, /* used for cfAudioOutput0ConfigTable */
 CAL_CFAUDIOOUTPUT1CONFIGTABLE, /* used for cfAudioOutput0ConfigTable */
 CAL_CFAUDIOOUTPUT2CONFIGTABLE, /* used for cfAudioOutput0ConfigTable */
 CAL_CFMAINMICCONFIGTABLE,      /* used for cfMainMicConfigTable      */
 CAL_CFAUXMICCONFIGTABLE,       /* used for cfAuxMicConfigTable       */
 CAL_CFVOLLEVELTOVALUES,        /* used for cfVolLevelToValuesConfigTable */
 CAL_CFIMEI_PART,               /* The NVRAM half of the encrypted imei*/

 /* Battery Management data */
 CAL_CFBATMANDATAVALUES,        /* used for cfBmCalData_p */

 CAL_CFAUDIOSTEREOOUTPUTCONFIGTABLE, /* used for cfstereoOutputConfigTable */


      
 /*
  * Include other files with Cal Data Id's in them here
  * Format of the file must be
  *
  *     CAL_CF<id 1>,
  *     CAL_CF<id 2>,
  *    ........
  *     CAL_CF<id n>,
  */

  CAL_LAST_ENTRY
}
CalDataId;

#define MAX_NUM_HALF_RAMP_POINTS 16

typedef Int16 TestRampData[MAX_NUM_HALF_RAMP_POINTS*2];
//typedef Int8 Int8array[3];
//typedef Int16 Int16array[3];
//typedef Int8 RxGainarray[3];
typedef Int16 Arfcn;
#define BURST_DATA_SIZE_WORDS_GMSK 10
#define BURST_DATA_SIZE_WORDS BURST_DATA_SIZE_WORDS_GMSK
typedef Int16 BurstData[BURST_DATA_SIZE_WORDS];
typedef Int16 DataLength; 
typedef unsigned char Char;

typedef struct TestModeTag
{
	boolean testKeypadOnStart;
	boolean testDisplayOnStart;
	boolean testLayer1OnStart;
	boolean testLedOnStart;
}
TestMode;

typedef struct PSNTag
{
	Int8 psn[64];
}
PSN;
typedef struct IMEITag
{
	Int8 imei[16];
}
IMEI;

typedef	struct BurstTag
{
	BurstMode bursting;
	Int8  burstOn[4];
	Arfcn arfcn[4];
	Int8 rxGain[4];
	Burst2Type burst2Type;
	Int8 timingAdvance;
	Int8 rachData;
	Int8 txPowerLevel;	
}
Burst;

typedef struct LoopBackTag
{
	Arfcn     bchArfcn;
    Arfcn     tchArfcn;
    Int8      timeSlot;
    Int8      tsc;
    Int8      powerLevel;
    LoopBackMode  mode;
}
LoopBack;

typedef struct LoopBackDataTag
{
	SignedInt16         timingOffsetQbits;
    SignedInt16         freqOffsetHz;
    Int16               bitErrors;
    Int16               softDecisionTotal;
    SignedInt16         rssi;
    Int8             success;
}
LoopBackData;

#define NVDATASIZE 256 /* Number of Int8 words to be used as data storage */
typedef struct NvDataTag
{
  DataLength  numBytes;         /* Number of bytes of data returned   */
  Int8       *dataBuffer_p;     /* Points to data is using pointers   */

⌨️ 快捷键说明

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