Wifly Driver  V1.0
uart.h
Go to the documentation of this file.
1 /***********************************************************************
2  * $Id:: $
3  *
4  * Project: uart: Simple UART echo for LPCXpresso 1700
5  * File: uarttest.c
6  * Description:
7  * LPCXpresso Baseboard uses pins mapped to UART3 for
8  * its USB-to-UART bridge. This application simply echos
9  * all characters received.
10  *
11  ***********************************************************************
12  * Software that is described herein is for illustrative purposes only
13  * which provides customers with programming information regarding the
14  * products. This software is supplied "AS IS" without any warranties.
15  * NXP Semiconductors assumes no responsibility or liability for the
16  * use of the software, conveys no license or title under any patent,
17  * copyright, or mask work right to the product. NXP Semiconductors
18  * reserves the right to make changes in the software without
19  * notification. NXP Semiconductors also make no representation or
20  * warranty that such application will be suitable for the specified
21  * use without further testing or modification.
22  **********************************************************************/
23 
24 /*****************************************************************************
25  * History
26  * 2010.07.01 ver 1.01 Added support for UART3, tested on LPCXpresso 1700
27  * 2009.05.27 ver 1.00 Prelimnary version, first Release
28  *
29 ******************************************************************************/
30 #ifndef __UART_H
31 #define __UART_H
32 
33 #define IER_RBR 0x01
34 #define IER_THRE 0x02
35 #define IER_RLS 0x04
36 
37 #define IIR_PEND 0x01
38 #define IIR_RLS 0x03
39 #define IIR_RDA 0x02
40 #define IIR_CTI 0x06
41 #define IIR_THRE 0x01
42 
43 #define LSR_RDR 0x01
44 #define LSR_OE 0x02
45 #define LSR_PE 0x04
46 #define LSR_FE 0x08
47 #define LSR_BI 0x10
48 #define LSR_THRE 0x20
49 #define LSR_TEMT 0x40
50 #define LSR_RXFE 0x80
51 
52 
53 #define DELAY_MODE 0
54 
61 uint32_t UARTInit( uint32_t portNum, uint32_t baudRate );
62 
68 uint32_t UARTClose( uint8_t PortNum);
69 
73 void UART0_IRQHandler( void );
77 void UART1_IRQHandler( void );
81 void UART2_IRQHandler( void );
82 
86 void UART3_IRQHandler( void );
87 
94 void UARTSend( uint32_t portNum, uint8_t *BufferPtr, uint32_t Length );
95 
104 int UARTReceive(uint8_t portNum, char* buffer, uint32_t timeout);
105 
112 void delayMs( uint32_t ms, uint8_t type);
113 
119 void clearBuffUart(uint8_t portNum);
120 
121 #endif /* end __UART_H */
122 /*****************************************************************************
123 ** End Of File
124 ******************************************************************************/
void delayMs(uint32_t ms, uint8_t type)
void UART1_IRQHandler(void)
Definition: uart.c:131
void UART3_IRQHandler(void)
Definition: uart.c:272
void UART0_IRQHandler(void)
Definition: uart.c:57
void UARTSend(uint32_t portNum, uint8_t *BufferPtr, uint32_t Length)
Definition: uart.c:538
void UART2_IRQHandler(void)
Definition: uart.c:205
uint32_t UARTInit(uint32_t portNum, uint32_t baudRate)
Definition: uart.c:339
int UARTReceive(uint8_t portNum, char *buffer, uint32_t timeout)
Definition: uart.c:592
void clearBuffUart(uint8_t portNum)
Definition: uart.c:680
uint32_t UARTClose(uint8_t PortNum)
Definition: uart.c:498