serial.h

来自「通过讨论常见的串口软件使用的方法」· C头文件 代码 · 共 32 行

H
32
字号
/*----------------------------------------------------------------------------------
File: 					serial.h
Author: 				Qiu Peng   [roc98@163.ne]
Note:					header of serial driver for Intel 196KC
Create Date:			2004.3.10
Last Modified:			2004.6.20
Note:	本实现参考了网上杨屹关于uC/OS-II到51移植的部分代码,在此表示感谢!
-----------------------------------------------------------------------------------*/

#ifndef _SERIAL_H
#define _SERIAL_H

void InitSerial(void);
void InitSerialBuffer(void);
void GetSerialCh(unsigned char *ch);
void PrintChar(unsigned char ch);
void PrintCh(unsigned char ch);
void PrintByte(unsigned char Byte);
void PrintStr(unsigned char *str);//显示字符串

void SerialTx(void);//串口发送中断服务子程序
void SerialRx(void);//串口接收中断服务子程序

OS_EXT	INT32U	SerialTxCount;
OS_EXT	INT32U	SerialRxCount;

#define LenTxBuf        2000   
#define LenRxBuf        50

#define	TABNum          4       //TAB键移动长度
#endif

⌨️ 快捷键说明

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