www.pudn.com > s3c2410_code_Test.rar > Uart0.h


/* 
********************************************************* 
* Copyright (c) 
* All rights reserved.				             
* 
* 文件名称:Uart0.h 
* 文件标识:头文件 
* 摘    要:本文件是对Uart0进行初始化和操作的头文件声明 
*            
* 当前版本:1.0 
* 作    者:刘征 
* 完成日期:2005.4.3 
* 
* 取代版本: 
* 作    者: 
* 完成日期: 
********************************************************* 
*/ 
#ifndef __UART0_H__ 
#define __UART0_H__ 
 
#ifdef __cplusplus 
extern "C" { 
#endif 
 
/* 
********************************************************* 
*   					 头文件 
********************************************************* 
*/ 
#include "Def.h" 
/* 
********************************************************* 
*  					  变量 
********************************************************* 
*/ 
extern volatile U16 rx_dncs; 
extern volatile U32 rx_point,rx_isdone,rx_filesize,rx_checksum; 
extern volatile U32 isDone,isTxInt,isRxInt,tx_cnt,tx_end,rx_cnt,rx_end,afc_err; 
extern volatile U8 *txdataPt; 
extern volatile U8 *txdataFl; 
extern volatile U8 *rxdataPt; 
extern volatile U8 *rxdataCk; 
 
/* 
********************************************************* 
*   					 常量宏定义 
********************************************************* 
*/ 
#define UARTBUFFER  _NONCACHE_STARTADDRESS 
#define TX_INTTYPE 1	//0:Tx interrupt type is pulse, 1:Tx interrupt type is level 
#define RX_INTTYPE 1	//0:Rx interrupt type is pulse, 1:Rx interrupt type is level 
 
/* 
********************************************************* 
*   					函数声明 
********************************************************* 
*/ 
void Uart_Port_Set(void); 
void Uart_Port_Return(void); 
void Uart_Uclk_En(int, int); 
void Uart_Pclk_En(int, int); 
 
void __irq Uart0_TxInt(void); 
void __irq Uart0_RxIntOrErr(void); 
 
void __sub_Uart0_RxInt(void); 
void __sub_Uart0_RxErrInt(void); 
 
void Test_Uart0_Int(void); 
 
#ifdef __cplusplus 
} 
#endif 
#endif /*__UART0_H__*/