|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2006-6-24 11:31:11
|
显示全部楼层
#include <iom8v.h>
#include <macros.h>
#define SetIGT (PORTD |= (1<<PD7)) // MC55模块点火控制脚,高有效
#define ClrIGT (PORTD &= ~(1<<PD7))
#define SetLED (PORTB |= (1<<PB0)) // LED
#define ClrLED (PORTB &= (1<<PB0))
#define DetRING0 (PORTD & (1<<PD2))
#define FALSE 0
#define TRUE 1
//定义常量,在程序区
const unsigned char At[] = {"AT"};
const unsigned char Ata[] = {"ATA"};
const unsigned char Ath[] = {"ATH"};
const unsigned char Ate0[] = {"ATE0"};
const unsigned char Atv0[] = {"ATV0"};
const unsigned char Atx0[] = {"ATX0"};
const unsigned char Atf[] = {"AT&F"};
const unsigned char Atclip[] = {"AT+CLIP=1"};
const unsigned char Atcsq[] = {"AT+CSQ"};
const unsigned char Atssyn[] = {"AT^SSYNC=1"};
const unsigned char Atsmso[] = {"AT^SMSO"};
const unsigned char Atsnfs[] = {"AT^SNFS=4"};
const unsigned char Atsnfi[] = {"AT^SNFI=4,32767"};
const unsigned char Atcnmi[] = {"AT+CNMI=1,1,0,0,1"};
const unsigned char Atsnfo[] = {"AT^SNFO=3,16384,16384,16384,16384,16384,4,0"};
const unsigned char Atcmgf[] = {"AT+CMGF=0"};
const unsigned char Atcmgs[] = {"AT+CMGS="};
const unsigned char Atcmgr[] = {"AT+CMGR="};
const unsigned char Atcmgl[] = {"AT+CMGL=0"};
const unsigned char Atcmgd[] = {"AT+CMGD="};
const unsigned char Atsnfpt[] = {"AT^SNFPT=0"};
const unsigned char Atclck1[] = {"AT+CLCK=\"SC\",1,"};
const unsigned char Atcpin[] = {"AT+CPIN?"};
const unsigned char Atclck2[] = {"AT+CLCK=\"SC\",2"};
const unsigned char Atcpwd[] = {"AT+CPWD=\"SC\","};
const unsigned char Atclck0[] = {"AT+CLCK=\"SC\",0,"};
const unsigned char Atcpinc[] = {"AT+CPIN="};
const unsigned char Atsblk[] = {"AT^SBLK"};
// 定义AT命令串长度
//const unsigned char AtcLength[] = {2,3,3,4,4,4,4,9,6,10,7,9,15,17,43,9,8,8,9,8,10,15,8,14,13,15,8,7};
#define AtLen 2
#define AtaLen 3
#define AthLen 3
#define Ate0Len 4
#define Atv0Len 4
#define Atx0Len 4
#define AtfLen 4
#define AtclipLen 9
#define AtcsqLen 6
#define AtssynLen 10
#define AtsmsoLen 7
#define AtsnfsLen 9
#define AtsnfiLen 15
#define AtcnmiLen 17
#define AtsnfoLen 43
#define AtcmgfLen 9
#define AtcmgsLen 8
#define AtcmgrLen 8
#define AtcmglLen 9
#define AtcmgdLen 8
#define AtsnfptLen 10
#define Atclck1Len 15
#define AtcpinLen 8
#define Atclck2Len 14
#define AtcpwdLen 13
#define Atclck0Len 15
#define AtcpincLen 8
#define AtcsblkLen 7 |
|