123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- #ifndef __MODEM_H_
- #define __MODEM_H_
- #define MODEM_AT_MSG_DATA_LEN (512+30)
- typedef struct{
- unsigned short MsgLen;
- unsigned char MsgData[MODEM_AT_MSG_DATA_LEN];
- }SUT_MODEM_AT_MSG;
- typedef enum
- {
- ENCODE_NULL,
- ENCODE_GBK,//ENCODE_ASCII,//ÖÐÎÄGBK ʵ¼ÊΪASCII
- ENCODE_UNICODEBigend,
- ENCODE_ASCII,
- ENCODE_UNICODE,
- ENCODE_UTF8=6
- }ENCODE_DEF;
- typedef enum{
- AUTH_LOGIN_NONE,
- AUTH_LOGIN_PAP,
- AUTH_LOGIN_CHAP
- }AUTH_LOGINDEF;
- //Modem Reset
- #define MODEM_RESET_PIN GPIO_Pin_15
- #define MODEM_RESET_PORT GPIOC
- #define MODEM_RESET_HIGH MODEM_RESET_PORT->BSRR = MODEM_RESET_PIN
- #define MODEM_RESET_LOW MODEM_RESET_PORT->BRR = MODEM_RESET_PIN
- ////Modem Powerkey
- //#define MODEM_PWRKEY_PIN GPIO_Pin_10
- //#define MODEM_PWRKEY_PORT GPIOB
- //#define MODEM_PWRKEY_HIGH MODEM_PWRKEY_PORT->BSRR = MODEM_PWRKEY_PIN
- //#define MODEM_PWRKEY_LOW MODEM_PWRKEY_PORT->BRR = MODEM_PWRKEY_PIN
- //Modem PWREN
- #define MODEM_PWREN_PIN GPIO_Pin_14
- #define MODEM_PWREN_PORT GPIOC
- #define MODEM_PWREN_HIGH MODEM_PWREN_PORT->BSRR = MODEM_PWREN_PIN
- #define MODEM_PWREN_LOW MODEM_PWREN_PORT->BRR = MODEM_PWREN_PIN
- //USBorTTL
- #define USBORTTL_PIN GPIO_Pin_13
- #define USBORTTL_PORT GPIOC
- #define USBORTTL_HIGH USBORTTL_PORT->BSRR = USBORTTL_PIN
- #define USBORTTL_LOW USBORTTL_PORT->BRR = USBORTTL_PIN
- //modem Update
- #define MODEM_UPDATE_PIN GPIO_Pin_8
- #define MODEM_UPDATE_PORT GPIOA
- #define MODEM_UPDATE_HIGH MODEM_UPDATE_PORT->BSRR = MODEM_UPDATE_PIN
- #define MODEM_UPDATE_LOW MODEM_UPDATE_PORT->BRR = MODEM_UPDATE_PIN
- extern SUT_MODEM_AT_MSG sutAtm,sutAtmPro;
- void ModemPinConfig(void);
- void ModemSendAt(char *p);
- void ModemSendData(unsigned char *pData,unsigned short datalen);
- void ModemVersionGet(char *msg);
- void ModemPocVerGet(char *msg);
- void ModemSetPocPara(char *msg,int len);
- void ModemApnConfig(void);
- void MeSpeak(ENCODE_DEF type, char *voice);
- void getModemModule(char *msg);
- void getModemVersion(char *msg);
- void CheckPocType(void);
- void ModemOwnPocSet(void);
- void getPocCode(char *msg);
- void SetDefaultSpkMic(void);
- void ModemGetICCID(char *msg);
- char *getIMEI(void);
- char *getICCID(void);
- char SimpleUserInfoScan(unsigned char firstIn,unsigned char direction);
- void ModemGetTime(char *msg);
- extern unsigned char ModemVer[15];
- #endif
|