uart.h

00001 /*****************************************************************************
00002  *   uart.h:  Header file for NXP LPC23xx Family Microprocessors
00003  *
00004  *   Copyright(C) 2006, NXP Semiconductor
00005  *   All rights reserved.
00006  *
00007  *   History
00008  *   2006.09.01  ver 1.00    Prelimnary version, first Release
00009  *
00010  ******************************************************************************/
00011 
00012 /* modified by Martin Thomas (check for __irq makro) */
00013 
00014 #ifndef __UART_H 
00015 #define __UART_H
00016 
00017 #define IER_RBR         0x01
00018 #define IER_THRE        0x02
00019 #define IER_RLS         0x04
00020 
00021 #define IIR_PEND        0x01
00022 #define IIR_RLS         0x03
00023 #define IIR_RDA         0x02
00024 #define IIR_CTI         0x06
00025 #define IIR_THRE        0x01
00026 
00027 #define LSR_RDR         0x01
00028 #define LSR_OE          0x02
00029 #define LSR_PE          0x04
00030 #define LSR_FE          0x08
00031 #define LSR_BI          0x10
00032 #define LSR_THRE        0x20
00033 #define LSR_TEMT        0x40
00034 #define LSR_RXFE        0x80
00035 
00036 #define UART_BUFSIZE            0x40
00037 
00038 u32 UARTInit( u32 portNum, u32 Baudrate );
00039 #ifdef __irq
00040 void UART0Handler( void ) __irq;
00041 void UART1Handler( void ) __irq;
00042 #else
00043 void UART0Handler( void );
00044 void UART1Handler( void );
00045 #endif
00046 void UARTSend( u32 portNum, const u8 *BufferPtr, u32 Length );
00047 
00048 extern volatile u32 UART0Count;
00049 extern volatile u8  UART0Buffer[UART_BUFSIZE];
00050 extern volatile u32 UART1Count;
00051 extern volatile u8  UART1Buffer[UART_BUFSIZE];
00052 
00053 #endif /* end __UART_H */
00054 /*****************************************************************************
00055 **                            End Of File
00056 ******************************************************************************/

Generated on Fri Apr 22 06:54:11 2011 for SFB by doxygen 1.5.9