📄 uart0.h
字号:
/**********************************************************************
* System Name DOOR
* Header Name uart0.h
* Version Date Editor Modification
* 1.0 2007/05/10 周斌 做成
**********************************************************************/
#include "global.h"
//uart波特率
#ifndef _BAUD_
#define _BAUD_
#define BAUD_300 1
#define BAUD_600 2
#define BAUD_900 3
#define BAUD_1200 4
#define BAUD_2400 5
#define BAUD_4800 6
#define BAUD_9600 7
#define BAUD_19200 8
#define BAUD_28800 9
#define BAUD_38400 10
#define BAUD_57600 11
#define BAUD_76800 12
#define BAUD_115200 13
#define BAUD_128000 14
#define BAUD_256000 15
#endif
/**********************************************************************
* Function Name uart0_init
* Function Desc 串口0初始化
* Return Value 无
* Parameter
t_ubbr:波特率配置选择
* Version Date Editor Modification
* 1.0 2007/05/09 周斌 做成
**********************************************************************/
void uart0_init(UCHAR t_baud);
/**********************************************************************
* Function Name uart0_put_byte
* Function Desc 通过串口0发送一个字节
* Return Value 无
* Parameter
t_char 要发送的字符
* Version Date Editor Modification
* 1.0 2007/05/09 周斌 做成
**********************************************************************/
void uart0_put_byte(char t_char);
/**********************************************************************
* Function Name uart0_put_string
* Function Desc 通过串口0发送一个字符串
* Return Value 无
* Parameter
* *p_str 字符串首指针
* Version Date Editor Modification
* 1.0 2007/05/09 周斌 做成
**********************************************************************/
void uart0_put_string(char * p_str);
/**********************************************************************
* Function Name uart0_get_byte
* Function Desc 从串口0的缓存中取一个字节
* Return Value
* SUCESS: 取字节成功
* FAIL: 取字节失败
* Parameter
*t_char 取字节地址
* Version Date Editor Modification
* 1.0 2007/05/10 周斌 做成
**********************************************************************/
UCHAR uart0_get_byte(char * t_char);
/**********************************************************************
* Function Name uart0_clear_buffer()
* Function Desc 清缓冲区
* Return Value
* Parameter
* Version Date Editor Modification
* 1.0 2007/05/09 史玮 做成
**********************************************************************/
void uart0_clear_buffer();
/**********************************************************************
* Function Name uart0_put_bytes
* Function Desc 通过串口0发送len个字节
* Return Value 无
* Parameter
pBytes 要发送的数据的首地址
len 数据长度
* Version Date Editor Modification
* 1.0 2007/05/09 史玮 做成
**********************************************************************/
void uart0_put_bytes(UCHAR * pBytes,UCHAR len);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -