gsm.h

来自「C语言源代码及相关资料」· C头文件 代码 · 共 55 行

H
55
字号
#ifndef	__AMOD_GSM_H__#define	__AMOD_GSM_H__#include "gsmcmd.h"#include "rspindparser.h"#include "rspindhandler.h"typedef	enum {		STATUS_GSM_POWER_OFF = 0,		STATUS_GSM_IDLE,		STATUS_GSM_WAIT_ANSWER,		STATUS_GSM_WAIT_DATA,		STATUS_GSM_TOP}		t_gsm_status;typedef	int		(*t_uart_close) ( void );typedef	int		(*t_uart_open)  ( int baud, int startbits, int databits, int paritybit, int stopbits );typedef	int		(*t_uart_read)  ( unsigned char * pbuf, int nSize );typedef	int		(*t_uart_write) ( unsigned char * pbuf, int nSize );typedef	int		(*t_uart_flush) ( void );typedef	int		(*t_echo_rsp) ( unsigned char * pRSP );typedef	int		(*t_echo)     ( unsigned char c );typedef	struct {		int					status;		t_uart_open			open;		t_uart_close		close;		t_uart_read			read;		t_uart_write		write;		t_uart_flush		flush;		t_echo_rsp			echo_rsp;		t_echo				echo;				t_rsp_ind_parser *	prsp;		t_cmd_req *			preq;}		t_gsm;#define	PWR_ON	1#define	PWR_OFF	0int		gsm_get_status    ( t_gsm * pgsm );int		gsm_set_status    ( t_gsm * pgsm, int status );void	gsm_power_control ( t_gsm * pgsm, int onoff );void	gsm_open          ( t_gsm * pgsm );void	gsm_close         ( t_gsm * pgsm );void	gsm_rsp_check     ( t_gsm * pgsm );#endif//__AMOD_GSM_H__

⌨️ 快捷键说明

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