📄 uart2.h
字号:
#ifndef _UART2_H_
#define _UART2_H_
/**********************************************************************
* System Name DOOR
* Header Name uart0.h
* Version Date Editor Modification
* 1.0 2007/05/10 史玮 做成
**********************************************************************/
#include "global.h"
UCHAR uart2_stat;
#define UART2_RX 0
#define UART2_TX 1
#define UART2_FREE 2
/**********************************************************************
* Function Name uart0_init
* Function Desc 串口0初始化
* Return Value 无
* Parameter
t_ubbr:波特率配置选择
* Version Date Editor Modification
* 1.0 2007/05/09 史玮 做成
**********************************************************************/
void uart2_init(void);
/**********************************************************************
* Function Name uart0_put_byte
* Function Desc 通过串口0发送一个字节
* Return Value 无
* Parameter
t_char 要发送的字符
* Version Date Editor Modification
* 1.0 2007/05/09 史玮 做成
**********************************************************************/
UCHAR uart2_put_byte(UCHAR 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 uart2_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 uart2_get_byte(UCHAR * t_char);
/**********************************************************************
* Function Name uart2_get_buffer_len
* Function Desc 从串口2的缓存中取一个字节
* Return Value
* buffer数据长度
* Parameter
*t_char 取字节地址
* Version Date Editor Modification
* 1.0 2007/05/10 史玮 做成
**********************************************************************/
void uart2_put_bytes(UCHAR * p_bytes,UCHAR len);
UCHAR uart2_get_buffer_len();
void uart2_clear_buffer();
void uart2_int_process(void);
/**********************************************************************
* Function Name uart2_put_byte_process
* Function Desc 把数据从uart2发送缓存发送到发送3100缓冲
* Return Value 无
* Parameter 无
* Version Date Editor Modification
* 1.0 2007/05/14 周斌 做成
**********************************************************************/
void uart2_put_byte_process(void);
/**********************************************************************
* Function Name uart2_rx_process
* Function Desc 把数据从3100接收缓冲搬移到uart2接收缓存
* Return Value 无
* Parameter 无
* Version Date Editor Modification
* 1.0 2007/05/14 周斌 做成
**********************************************************************/
void uart2_rx_process(void);
/**********************************************************************
* Function Name uart2_put_string
* Function Desc 通过串口1发送一个字符串
* Return Value 无
* Parameter
* *p_str 字符串首指针
* Version Date Editor Modification
* 1.0 2007/05/09 周斌 做成
**********************************************************************/
void uart2_put_string(char * p_str);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -