rs232.h

来自「一个LCD TV的源程序, 用的是realtek的IC」· C头文件 代码 · 共 60 行

H
60
字号
/*********************************************************************

      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 + =
减小字号Ctrl + -
显示快捷键?