internal_uart.h

来自「ucos270在bf533移植成功的代码 适合Ucos学习」· C头文件 代码 · 共 70 行

H
70
字号
/*
****************************************************************************************
*
*            Global Navigation Satellite System
*
*           ----- Internal UART Definitions -----
*
****************************************************************************************
*																					    
*    Module:	       $Source: $									 
*    Created By:       Ron Territo
*    Revision:         $Revision: $
*    Last Updated By:  $Author:  $
*	 Updated On:       $Date: $												    
*																				  		
*    Description:		Definitions for Blackfin Internal UART
*																						
****************************************************************************************
*	This material is VISTAR restricted and shall not be disclosed					    
*   to a third party without the consent of Vistar Telecommunications Inc.		    
*																					    
*   Copyright VISTAR 2003 													 
*																					    
****************************************************************************************
*/


#define UART_5_DATABIT  		0x00
#define UART_6_DATABIT  		0x01
#define UART_7_DATABIT  		0x02
#define UART_8_DATABIT  		0x03

#define UART_1_STOPBIT  		0x00
#define UART_2_STOPBIT  		0x04

#define UART_NO_PARITY			0x00
#define UART_ODD_PARITY			0x08
#define UART_EVEN_PARITY		0x18
#define UART_FORCE_ONE_PARITY	0x28
#define UART_FORCE_ZERO_PARITY	0x38

#define UART_BAUD_2400			((SYS_CLOCK/2400)/16)
#define UART_BAUD_9600			((SYS_CLOCK/9600)/16)			
#define UART_BAUD_19200			((SYS_CLOCK/19200)/16)			
#define UART_BAUD_38400			((SYS_CLOCK/38400)/16)			
#define UART_BAUD_115200		((SYS_CLOCK/115200)/16)			


extern int InternalUARTInit( int Baud, int Config );

extern bool InternalUartPutChar( char charTx );
extern int InternalUartGetChar( int timeout );

extern OS_FLAG_GRP *EvUARTFlags;
#define EV_UART_FLAG_RX_AVAIL 		1
#define EV_UART_FLAG_RX_OVERFLOW	2
#define EV_UART_FLAG_TX_EMPTY		4
#define EV_UART_FLAG_TX_READY		8

extern unsigned char *RxIntBufferEptr;
extern unsigned char *RxIntBufferFptr;
extern unsigned char *RxIntBufferTptr;
extern unsigned char RxIntBuffer[];

extern unsigned char *TxIntBufferEptr;
extern unsigned char *TxIntBufferFptr;
extern unsigned char *TxIntBufferTptr;
extern unsigned char TxIntBuffer[];

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?