采用cb平台开发

源代码在线查看: modem.~h

软件大小: 641 K
上传用户: zxc28287176
关键词: 平台开发
下载地址: 免注册下载 普通下载 VIP

相关代码

				////////////////////////////////////////////////////
				// File: modem.h
				// Func: time for modem sync
				// Modi: 2007-10-08
				// Auth: Henry
				////////////////////////////////////////////////////
				#ifndef __MODEMH__
				#define __MODEMH__
				
				//--------------------------------------------------------
				#define NORMAL_DIAL			0		//正常拔号
				#define BEFOREHAND_DIAL		1		//预拔号
				//--------------------------------------------------------
				#define STA_LINE_NO		1		//断开
				#define STA_TEL_IDLE		0		//空闲
				#define STA_LINE_OFF		1		//断开
				#define STA_LINE_DATAOFF	2		//数据挂断
				#define STA_NO_CCARRIER		3		//无载波
				
				#define STA_DIAL_GO			4		//正在拨号
				#define STA_DIAL_FAIL		5		//正在拨号
				#define STA_SYNC_GO			6		//开始同步
				#define STA_SYNC_FAIL		7		//开始同步
				
				#define STA_LINE_IDLE		8		//在线空闲
				#define STA_SEND_DATA		9		//正在传数据
				#define STA_SEND_END		10		//传输完成
				#define STA_REC_END			11		//接收数据完成
				#define STA_SEND_FAIL		12		//发送失败
				
				//--------------------------------------------------------
				#define SEND_START			0
				#define SEND_SENDING		1
				#define SEND_END			2
				//--------------------------------------------------------
				#define SEND_SUCCESSFUL		0
				#define SEND_LINE_OFF		1
				#define TIME_OVERFLOW		2
				#define SEND_ERROR_LENGTH	3
				#define SEND_UNRIPE			4
				//--------------------------------------------------------
				#define REC_SUCCESSFUL		0
				#define REC_LINE_OFF		1
				#define TIME_OVERFLOW		2
				//--------------------------------------------------------
				//MODEM
				unsigned char ModemInit(void);
				unsigned char ModemDial(unsigned char	*pDialNum,unsigned char	Mode);
				unsigned char ModemHook(void);
				unsigned char ModemSend(unsigned char *buff,unsigned short len);
				unsigned char ModemRecv(unsigned char *rcvBuf,unsigned short *len,unsigned int lLen);
				unsigned char ModemState(void);
				
				void timer3_c_irq_handler(void);
				//--------------------------------------------------------
				extern unsigned char  set_char(char idxport,unsigned char data);
				extern unsigned char get_char(char idxport,unsigned char *data);
				extern void PortOpen(unsigned char com,unsigned int baudrate);
				extern void DebugPrint(char *frm, ...);
				extern void DebugData(unsigned char cSlot,unsigned long length,unsigned int x,unsigned char *buff);
				extern void DelayMs(int iMs);
				extern void DebugString(unsigned char cSlot,char *string);
				extern volatile unsigned char entimer;
				//--------------------------------------------------------
				#endif
							

相关资源