📄 rs232.h
字号:
/*********************************************************************
COPYRIGHT (C) Himax Technologies, Inc.
File name : rs232.h
Description : Implement rs232 head file
Author : Nice
Create date : 2004.10.04
Modifications :
*********************************************************************/
#ifndef _RS232_H
#define _RS232_H
/********************** Include Section *****************************/
#include "mcu_io.h"
#include "main.h"
#include "common.h"
#include "i2c_control.h"
/********************** Define RS232 Relative *********************/
#define UART_RX_BUF_TYPE iQUEUE /* UART RX buffer type */
#define UART_TX_BUF_TYPE iQUEUE /* UART TX buffer type */
#define TH_RELOAD 0xFD
#define SIZE_OF_UART_RX_BUF 1 /* UART RX buffer size */
#define SIZE_OF_UART_TX_BUF 3 /* UART TX buffer size */
/******************* External Function Process *********************/
#undef EXTERN
#ifdef _RS232_C
#define EXTERN
iQueue UART_Rx, UART_Tx; /* UART RX/TX data structure */
idata Byte UART_Rx_BUF[SIZE_OF_UART_RX_BUF]; /* UART RX buffer */
idata Byte UART_Tx_BUF[SIZE_OF_UART_TX_BUF]; /* UART TX buffer */
#else
#define EXTERN extern
#endif
/**************** Function Prototype Declaration ********************/
EXTERN void Init_UART(void);
EXTERN void Puts_UART(char *s);
EXTERN bit Put_UART(Byte c);
EXTERN void HexTobyStr(Byte c);
EXTERN Byte Get_UART(void);
/************************ End of File ******************************/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -