- #define DEBUG
- #define MOSControl //MOS管方式
- #define HZQJ
- //#define HZGA //杭州公安
- //#define zjdl //浙江电力
- //#define SendSMSFlag //短信发送
- //#define BENQ_M32
- //#define GPS_View
- //#define WZDL //温州电力
- //#define JXDL //嘉兴电力
- #define GSMDormancy //休眠
- #include "config.h"
- #define UART0_MAXLen 400
- #define UART1_MAXLen UART0_MAXLen
- #define MODEM_BUFFER_SIZE UART1_MAXLen
- #define GPS_MAXLen 100
- #define OUT_MAXLen 100
- #define UART0_BPS 57600 // 串口通讯波特率
- #define soon 3000
- #define slow 50000
- #define sleep 200000
- #define MsgTime 100
- #define SerialTime 1000 //串口接收数据时间
- #define SMS_Time 20 //短信发送时间(当在该时间内GPRS无应答时,发送短信) /秒
- #define Phone_AT_Max 200000//1200000 //GPRS重新连接时间
- #define DYDD_MAX_Value 200000 //断油断电控制时间
- #define MAX_MSG_SHU 5 //定义心跳发送次数
- #define GPS_Speed_Flag_MAX 3
- #define GPS_Con_MAX 10*60 //10min * 60 sec
- void DelayMs(uint16 dly);
- #define GPRS 0
- #define SMS 1
- #define Serial 2
- #define Phone 3
- #define Sleep 4
- #define GPS_9600 1152
- #define GPS_4800 GPS_9600*2
- #define Phone_600 GPS_9600*16
- #define PowOnPort 1<<23 //P1.23
- #define Row4Port 1<<20 //P1.20
- #define IO_13Port 1<<26
- #define GPSPort 1 << 3 //GPS数据接收脚
- #define SPI_CLK (1 << 17)
- #define SPI_MISO (1 << 18)
- #define SPI_MOSI (1 << 19)
- #define GSMLEDPort 1<<6 //GSMLED测试端口
- #define RingPort 1<<15 //P0.15
- #define SMSPort 1<<16 //P0.16 //2.1版里的 由P0.20改为P0.16
- #define WdtPort 1<<25 //P0.25
- #define Alarm_Port 1 << 29 //P0.29 //报警检测脚
- #ifdef RelayControl
- #define GPRSPort 1<<7 //P0.7 //P0.14
- #else
- #define GPRSPort 1<<7 //P0.7
- #endif
- #define GSMPowPort 1<<23 //P0.23
- #define SP6201_Con 1<<16 //P1.16
- #define VCC3_3GPSCon 1<<2 //P0.2
- #define VDD_Test 1<<30 //P0.30
- /******************** 手柄向车台传递的信息 *********************************/
- #define HELLO 0x90 //手柄工作正常
- #define HS_OK 0x10 //手柄工作正常(通话中发送的目标)
- #define HOOK_OFF 0x11 //手柄摘机
- #define HOOK_ON 0x12 //手柄挂机
- #define EMERGENCY 0x93 //医疗服务请求
- #define ASSISTANCE 0x14 //故障服务请求
- #define INFORMATION 0x95 //信息服务请求
- #define SETTING 0x96 //设置指令
- #define DIALING 0x17 //拨号指令(后跟电话号码及字符串结束符)
- #define STRING_END 0x18 //字符串结束符
- #define EAR 0x9a //耳机通话
- #define HANDSET 0x99 //手柄通话
- #define VOLUME_UP 0x1b //音量增大
- #define VOLUME_DN 0x9c //音量减小
- /********************* 车台向手柄传递的信息 ************************************/
- #define RING_SIGNAL 0xa0 //有振铃
- #define CALLER_ID 0x21 //主叫号码(后跟来电号码)
- #define ID_NUM_END 0x24 //主叫号码结束
- #define HANGUP 0x22 //主控单元处于挂机状态
- #define PICK_UP 0xa5 //主控单元处于挂机状态
- #define MISTAKE 0x28 //收到指令错误,请重发
- #define OK 0xb1 //收到指令准确
- #define BELL 0x35 //蜂鸣器响两声
- #define PICKING_UP 0xa6 //对方摘机(可供通话记时用)
- #define SET_ENABLE 0x27 //允许手柄设置
- /*********************** 车台与手柄之间传递的数字信息 *********************************/
- #define DIGIT1 0x1 //1
- #define DIGIT2 0x2 //2
- #define DIGIT3 0x3 //3
- #define DIGIT4 0x4 //4
- #define DIGIT5 0x5 //5
- #define DIGIT6 0x6 //6
- #define DIGIT7 0x7 //7
- #define DIGIT8 0x8 //8
- #define DIGIT9 0x9 //9
- #define DIGIT0 0x0a //0
- #define DIGITM 0xd //*
- #define DIGITJ 0xc //#
- #define DIGITL 0xe //|