📄 pcm.h
字号:
/*
+-----------------------------------------------------------------------------
| Project : GSM-MFW
| Modul :
+-----------------------------------------------------------------------------
| Copyright 2002 Texas Instruments Berlin, AG
| All rights reserved.
|
| This file is confidential and a trade secret of Texas
| Instruments Berlin, AG
| The receipt of or possession of this file does not convey
| any rights to reproduce or disclose its contents or to
| manufacture, use, or sell anything it may describe, in
| whole, or in part, without the specific written consent of
| Texas Instruments Berlin, AG.
+-----------------------------------------------------------------------------
| Purpose : Types definitions for the permanent memory configuration.
+-----------------------------------------------------------------------------
*/
#ifndef PCM_H
#define PCM_H
/********************************************************************
*
* Parameters written in flash memory
*
********************************************************************/
#define PCM_SERIAL_CONFIG (0)
/********************************************************************
*
* Access functions to bit fields
*
********************************************************************/
#ifndef __BF_FUNCCALL__
#define FldGet(f,n) ((((ULONG)f)&((ULONG)n##m))>>n##s)
#define FldSet(f,n,v) ((((ULONG)f)&(~((ULONG)n##m)))|(((ULONG)v)<<n##s))
#else
ULONG FldGet (ULONG f, ULONG m, int s)
{ return ((f&m)>>s); }
ULONG FldSet (ULONG f, ULONG m, int s, ULONG v)
{ return ((f&(~m))|((v<<s)&m)); }
#endif
/********************************************************************
*
* Field Identitifer
*
********************************************************************/
#define EF_MSCAP_ID "MSCAP" /* Mobile Capabilities */
#define EF_IMEI_ID "IMEI" /* Int. Mobile Equipment Id */
#define EF_IMSI_ID "IMSI" /* Int. Mobile Subscriber Id */
#define EF_SMS_ID "SMS" /* Short Messages */
#define EF_CLASS2_ID "CLASS2" /* MS Classmark 2 */
#define EF_CLASS3_ID "CLASS3" /* MS Classmark 3 (old def.)*/
#define EF_RFCAP_ID "RFCAP" /* RF Capabilities */
#define EF_MSSUP_ID "MSSUP" /* Mobile Setup */
#define EF_MSSET_ID "MSSET" /* Mobile Setting */
#define EF_LDN_ID "LDN" /* Last Dialed Numbers */
#define EF_LRN_ID "LRN" /* Last Received Numbers */
#define EF_LMN_ID "LMN" /* Last Missed Numbers */
#define EF_UPN_ID "UPN" /* User Personal Numbers */
#define EF_MBN_ID "MBN" /* Mailbox Numbers */
#define EF_VMN_ID "VMN" /* Voice Mail Number */
#define EF_CLNG_ID "CLNG" /* Current LAnguage */
#define EF_CTIM_ID "CTIM" /* Call Timer */
#define EF_CCNT_ID "CCNT" /* Call Counter */
#define EF_ECC_ID "ECC" /* Emergency Call Codes */
#define EF_ORG_ID "ORG" /* Organizer and Alarm */
#define EF_CCP_ID "CCP" /* Caps and Config Params */
#define EF_EXT1_ID "EXT1" /* Extension 1 */
#define EF_SIMLCK_ID "SIMLCK" /* SIM Lock */
#define EF_SIMLCKEXT_ID "SIMLCKEXT" /* SIM Lock Extended */
#define EF_MAIN_ID "MAIN" /* Maintenance */
#define EF_SFK_ID "SFK" /* Special Function Key */
#define EF_FAULT_ID "FAULT" /* Fault Conditions */
#define EF_DEBUG_ID "DEBUG" /* Debug Information */
#define EF_POWER_ID "POWER" /* Power Management */
#define EF_KEYB_ID "KEYB" /* Keyboard Mapping */
#define EF_RADIO_ID "RADIO" /* Radio Parameter */
#define EF_CGMI_ID "CGMI" /* Manufacturer */
#define EF_INF0_ID "INF0" /* Manufacturer 1 */
#define EF_CGMM_ID "CGMM" /* Model */
#define EF_CGMR_ID "CGMR" /* Revision */
#define EF_CGSN_ID "CGSN" /* Product Serial Number */
#define EF_SMSPRFL_ID "SMSPRFL" /* SMS Profile */
#define EF_PLMN_ID "PLMN" /* PLMN Identifier */
#define EF_BCCHINFO_ID "BCCHINF" /* BCCH Information */
#define EF_ALS_ID "ALS" /* alternate line service */
#define EF_LOCGPRS_ID "LOCGPRS" /* Location Inf. (GPRS) */
#define EF_KCGPRS_ID "KCGPRS" /* Ciphering Key (GPRS) */
#define EF_IMSIGPRS_ID "IMSIGPRS" /* IMSI check for GPRS */
/********************************************************************
*
* Return Values
*
********************************************************************/
#define drv_Return_Type UBYTE
#define PCM_OK 0
#define PCM_INITIALIZED 1
#define PCM_INVALID_FILE 2
#define PCM_INVALID_SIZE 3
#define PCM_INVALID_CKSM 4
#define PCM_INVALID_RECORD 5
#define PCM_NVRAM_ACCS_FAIL 6
#define PCM_ERASE_ERROR 7
#define PCM_WRITE_ERROR 8
/*
* Field Info Structure
*/
typedef struct pcm_FileInfo_Type
{
UBYTE * FileLocation;
USHORT FileSize;
UBYTE Version;
} pcm_FileInfo_Type;
/********************************************************************
*
* Field MOBILE CAPABILITIES
*
********************************************************************/
typedef struct pcm_EFmscap_Type /* Mobile Capabilities */
{
UBYTE chnMode; /* channel modes */
UBYTE datCap1; /* data capabilities */
UBYTE datCap2; /* data capabilities */
UBYTE featLst1; /* feature list */
UBYTE featLst2; /* feature list */
UBYTE featLst3; /* feature list */
} EF_MSCAP;
#define SIZE_EF_MSCAP 6
#define NR_EF_MSCAP 1
/*
* chnMode bits
*
* Octet 8 7 6 5 4 3 2 1
* L1 Tm afs ahs spV3 efrV2 hr spV1
*/
#define spchSupV1 0x00000001,0 /* speech support (vers. 1) */
#define spchSupV1m 0x00000001
#define spchSupV1s 0
#define hrSup 0x00000002,1 /* HR support */
#define hrSupm 0x00000002
#define hrSups 1
#define HR_EFRSup 0x00000006,1 /* HR and EFR support */
#define HR_EFRSupm 0x00000006
#define HR_EFRSups 1
#define EFRSupV2 0x00000004,2 /* enhanced FR support (v2) */
#define EFRSupV2m 0x00000004
#define EFRSupV2s 2
#define EFRSupV3 0x00000008,3 /* speech support (vers 3) */
#define EFRSupV3m 0x00000008
#define EFRSupV3s 3
#define VocSup 0x0000000F,0 /* vocoder support */
#define VocSupm 0x0000000F
#define VocSups 0
#define AHS 0x00000010,4 /* adaptive multirate half rate speech */
#define AHSm 0x00000010
#define AHSs 4
#define AFS 0x00000020,5 /* adaptive multirate full rate speech */
#define AFSm 0x00000020
#define AFSs 5
#define TestMobile 0x00000040,6 /* Test Mobile */
#define TestMobilem 0x00000040
#define TestMobiles 6
#define L1Ver 0x00000080,7 /* Layer 1 Version */
#define L1Verm 0x00000080
#define L1Vers 7
/*
* datCap bits
*/
#define datSup 0x00000001,0 /* Data support */
#define datSupm 0x00000001
#define datSups 0
#define RLPSup 0x00000002,1 /* RLP data (NT Async) */
#define RLPSupm 0x00000002
#define RLPSups 1
#define AsySup 0x00000004,2 /* T Async data support */
#define AsySupm 0x00000004
#define AsySups 2
#define NTSynSup 0x00000008,3 /* NT Sync data support */
#define NTSynSupm 0x00000008
#define NTSynSups 3
#define TSynSup 0x00000010,4 /* NT Sync data support */
#define TSynSupm 0x00000010
#define TSynSups 4
#define NTFaxSup 0x00000020,5 /* NT Fax support */
#define NTFaxSupm 0x00000020
#define NTFaxSups 5
#define TFaxSup 0x00000040,6 /* T Fax support */
#define TFaxSupm 0x00000040
#define TFaxSups 6
#define Dr14_4Sup 0x00000080,7 /* Data rate 14.4 support */
#define Dr14_4Supm 0x00000080
#define Dr14_4Sups 7
/*
* datCap2 bits
*/
#define NTPackSup 0x00000001,0 /* NT Packet Service */
#define NTPackSupm 0x00000001
#define NTPackSups 0
#define TPackSup 0x00000002,1 /* T Packet Service */
#define TPackSupm 0x00000002
#define TPackSups 1
#define NTPadSup 0x00000004,2 /* NT PAD Access Service */
#define NTPadSupm 0x00000004
#define NTPadSups 2
#define TPadSup 0x00000008,3 /* T PAD Access Service */
#define TPadSupm 0x00000008
#define TPadSups 3
#define NAltSrvSup 0x00000010,4 /* No Alternate Services */
#define NAltSrvSupm 0x00000010
#define NAltSrvSups 4
#define DHRSup 0x00000080,7 /* Data Halfrate support */
#define DHRSupm 0x00000080
#define DHRSups 7
/********************************************************************
*
* Field IMEI
*
********************************************************************/
typedef struct pcm_EFimei_Type /* International ME Id */
{
UBYTE tac1;
UBYTE tac2;
UBYTE tac3;
UBYTE fac;
UBYTE snr1;
UBYTE snr2;
UBYTE snr3;
UBYTE svn;
} EF_IMEI;
#define SIZE_EF_IMEI 8
#define NR_EF_IMEI 1
/********************************************************************
*
* Field IMSI
*
********************************************************************/
typedef struct pcm_EFimsi_Type /* International Subscriber Id */
{
UBYTE len;
UBYTE IMSI[8];
} EF_IMSI;
#define SIZE_EF_IMSI 9
#define NR_EF_IMSI 1
/********************************************************************
*
* Field SHORT MESSAGE SERVICES
*
********************************************************************/
typedef struct pcm_EFsms_Type /* Short Messages */
{
UBYTE stat;
UBYTE rmd[175];
} EF_SMS;
#define SIZE_EF_SMS 176
#ifdef _SIMULATION_
#define NR_EF_SMS 3
#else
#define NR_EF_SMS 1
#endif
/********************************************************************
*
* Field MOBILE STATION CLASSMARK 2
*
********************************************************************/
typedef struct pcm_EFclass2_Type /* Mobile Station Classmark 2 */
{
UBYTE byte1;
UBYTE byte2;
UBYTE byte3;
} EF_CLASS2;
#define SIZE_EF_CLASS2 3
#define NR_EF_CLASS2 1
/*
* byte1
*/
#define rfPwrCap 0x00000007,0 /* rf power capability */
#define rfPwrCapm 0x00000007
#define rfPwrCaps 0
#define a51 0x00000008,3 /* rf power capability */
#define a51m 0x00000008
#define a51s 3
#define esInd 0x00000010,4 /* ES indicator */
#define esIndm 0x00000010
#define esInds 4
#define revLev 0x00000060,5 /* revision level */
#define revLevm 0x00000060
#define revLevs 5
/*
* byte2
*/
#define freqCap 0x00000001,0 /* frequency capability */
#define freqCapm 0x00000001
#define freqCaps 0
#define vgcsCap 0x00000002,1 /* VGCS notification reception */
#define vgcsCapm 0x00000002
#define vgcsCaps 1
#define vbsCap 0x00000004,2 /* VBS notification reception */
#define vbsCapm 0x00000004
#define vbsCaps 2
#define smCap 0x00000008,3 /* SM capability */
#define smCapm 0x00000008
#define smCaps 3
#define ssScrInd 0x00000030,4 /* SS Screen Indicator */
#define ssScrIndm 0x00000030
#define ssScrInds 4
#define psCap 0x00000040,6 /* PS capability */
#define psCapm 0x00000040
#define psCaps 6
/*
* byte3
*/
#define a52 0x00000001,0 /* encryption algorithm A5/2 */
#define a52m 0x00000001
#define a52s 0
#define a53 0x00000002,1 /* encryption algorithm A5/3 */
#define a53m 0x00000002
#define a53s 1
#define cmspCap 0x00000004,2 /* CM service prompt */
#define cmspCapm 0x00000004
#define cmspCaps 2
#define solsaCap 0x00000008,3 /* SoLSA */
#define solsaCapm 0x00000008
#define solsaCaps 3
#define ucs2Cap 0x00000010,4 /* UCS2 treatment */
#define ucs2Capm 0x00000010
#define ucs2Caps 4
#define lcsvaCap 0x00000020,5 /* LCS VA capability */
#define lcsvaCapm 0x00000020
#define lcsvaCaps 5
#define cm3bit 0x00000080,7 /* Classmark 3 available */
#define cm3bitm 0x00000080
#define cm3bits 7
/********************************************************************
*
* Field MOBILE STATION CLASSMARK 3
*
********************************************************************/
typedef struct pcm_EFclass3_Type /* Mobile Station Classmark 3 */
{
UBYTE byte1;
UBYTE byte2;
UBYTE byte3;
}EF_CLASS3;
#define SIZE_EF_CLASS3 3
#define NR_EF_CLASS3 1
/*
* byte1
*/
#define a54 0x00000001,0 /* encryption algorithm A5/4 */
#define a54m 0x00000001
#define a54s 0
#define a55 0x00000002,1 /* encryption algorithm A5/5 */
#define a55m 0x00000002
#define a55s 1
#define a56 0x00000004,2 /* encryption algorithm A5/6 */
#define a56m 0x00000004
#define a56s 2
#define a57 0x00000008,3 /* encryption algorithm A5/7 */
#define a57m 0x00000008
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -