📄 uart.h
字号:
#ifndef __Uart__H__
#define __Uart__H__
//#define F_CPU 11059200
#define baud 9600
#define UBRR (F_CPU/16/baud-1)
#define OutLEN 255 //串口发送缓冲大小
#define InLEN 40 //串口接收缓冲大小
extern volatile unsigned char UartSendBuffer[];
extern volatile unsigned char UartReceiveBuffer[];
extern volatile unsigned char *outlast;
extern volatile unsigned char *putlast;
extern volatile unsigned char UartSendBufferemptyFlag;
extern volatile unsigned char UartSendBufferHaveDataFlag;
extern volatile unsigned char UartReceiveCounter;
extern volatile unsigned char UartTimeoutFlag;
extern volatile unsigned char WaitForUartCounter;
extern volatile unsigned char UartDataReadyFlag;
void UartInit(void);
void UartSendchar(unsigned char data);
void UartSendString(unsigned char *str);
void UartSendByte(unsigned char *Startaddr,unsigned char SendByte);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -