#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 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 //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