gprsshortmessage.h

来自「GPRS短信收发 基于linux平台」· C头文件 代码 · 共 38 行

H
38
字号
#ifndef _GPRS_SHORTMESSAGE_H_
#define _GPRS_SHORTMESSAGE_H_

#define FALSE 0
#define TRUE 1
struct shortmsg
{
	int index;
	char msgcontent[100];
	char sender[15];
	time_t sendtime;
};

/*
int speed_arr[] = { B38400, B19200, B9600, B4800, B2400, B1200, B300,
	    B38400, B19200, B9600, B4800, B2400, B1200, B300, };
int name_arr[] = {38400,  19200,  9600,  4800,  2400,  1200,  300,
	    38400,  19200,  9600, 4800, 2400, 1200,  300, };
char *DEV="/dev/ttyS0";
*/

void set_speed(int fd, int speed);
int set_parity(int fd,int databits,int stopbits,int parity);
void SetFlowControl(int com,int mode);
int Open_Init_COM(char *Dev);
int ReadCOM(int n,char *buf,int length);
int WriteCOM(int n,char *buf,int length);
int CloseCOM(int n);
int Gprs_SendMessage(int com,char at_cmd_array[][30],char * pMsg);
int Gprs_ReceiveMessage(int com,char at_cmd_array[][30],struct shortmsg * pShortMsg);
int sendshortmessagethread(struct shortmsg *);
int receiveshortmessagethread(void);
int Gprs_DeleteMessage(int ,int );
int messagepromptfunc(struct shortmsg * );


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?