The common folder libraries from keil LPC11Uxx code bundle

Committer:
alexan_e
Date:
Sun May 27 23:59:30 2012 +0000
Revision:
0:05d110ee258e

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
alexan_e 0:05d110ee258e 1 /****************************************************************************
alexan_e 0:05d110ee258e 2 * $Id:: uart.h 9155 2012-02-14 23:23:34Z nxp41306 $
alexan_e 0:05d110ee258e 3 * Project: NXP LPC11Uxx software example
alexan_e 0:05d110ee258e 4 *
alexan_e 0:05d110ee258e 5 * Description:
alexan_e 0:05d110ee258e 6 * This file contains definition and prototype for UART configuration.
alexan_e 0:05d110ee258e 7 *
alexan_e 0:05d110ee258e 8 ****************************************************************************
alexan_e 0:05d110ee258e 9 * Software that is described herein is for illustrative purposes only
alexan_e 0:05d110ee258e 10 * which provides customers with programming information regarding the
alexan_e 0:05d110ee258e 11 * products. This software is supplied "AS IS" without any warranties.
alexan_e 0:05d110ee258e 12 * NXP Semiconductors assumes no responsibility or liability for the
alexan_e 0:05d110ee258e 13 * use of the software, conveys no license or title under any patent,
alexan_e 0:05d110ee258e 14 * copyright, or mask work right to the product. NXP Semiconductors
alexan_e 0:05d110ee258e 15 * reserves the right to make changes in the software without
alexan_e 0:05d110ee258e 16 * notification. NXP Semiconductors also make no representation or
alexan_e 0:05d110ee258e 17 * warranty that such application will be suitable for the specified
alexan_e 0:05d110ee258e 18 * use without further testing or modification.
alexan_e 0:05d110ee258e 19 ****************************************************************************/
alexan_e 0:05d110ee258e 20 #ifndef __UART_H
alexan_e 0:05d110ee258e 21 #define __UART_H
alexan_e 0:05d110ee258e 22
alexan_e 0:05d110ee258e 23 #define AUTOBAUD_ENABLE 0
alexan_e 0:05d110ee258e 24 #define FDR_CALIBRATION 0
alexan_e 0:05d110ee258e 25 #define RS485_ENABLED 0
alexan_e 0:05d110ee258e 26 #define TX_INTERRUPT 0 /* 0 if TX uses polling, 1 interrupt driven. */
alexan_e 0:05d110ee258e 27 #define MODEM_TEST 0
alexan_e 0:05d110ee258e 28
alexan_e 0:05d110ee258e 29 #define IER_RBR (0x01<<0)
alexan_e 0:05d110ee258e 30 #define IER_THRE (0x01<<1)
alexan_e 0:05d110ee258e 31 #define IER_RLS (0x01<<2)
alexan_e 0:05d110ee258e 32 #define IER_ABEO (0x01<<8)
alexan_e 0:05d110ee258e 33 #define IER_ABTO (0x01<<9)
alexan_e 0:05d110ee258e 34
alexan_e 0:05d110ee258e 35 #define IIR_PEND 0x01
alexan_e 0:05d110ee258e 36 #define IIR_RLS 0x03
alexan_e 0:05d110ee258e 37 #define IIR_RDA 0x02
alexan_e 0:05d110ee258e 38 #define IIR_CTI 0x06
alexan_e 0:05d110ee258e 39 #define IIR_THRE 0x01
alexan_e 0:05d110ee258e 40 #define IIR_ABEO (0x01<<8)
alexan_e 0:05d110ee258e 41 #define IIR_ABTO (0x01<<9)
alexan_e 0:05d110ee258e 42
alexan_e 0:05d110ee258e 43 #define LSR_RDR (0x01<<0)
alexan_e 0:05d110ee258e 44 #define LSR_OE (0x01<<1)
alexan_e 0:05d110ee258e 45 #define LSR_PE (0x01<<2)
alexan_e 0:05d110ee258e 46 #define LSR_FE (0x01<<3)
alexan_e 0:05d110ee258e 47 #define LSR_BI (0x01<<4)
alexan_e 0:05d110ee258e 48 #define LSR_THRE (0x01<<5)
alexan_e 0:05d110ee258e 49 #define LSR_TEMT (0x01<<6)
alexan_e 0:05d110ee258e 50 #define LSR_RXFE (0x01<<7)
alexan_e 0:05d110ee258e 51
alexan_e 0:05d110ee258e 52 #define BUFSIZE 0x40
alexan_e 0:05d110ee258e 53
alexan_e 0:05d110ee258e 54 /* RS485 mode definition. */
alexan_e 0:05d110ee258e 55 #define RS485_NMMEN (0x1<<0)
alexan_e 0:05d110ee258e 56 #define RS485_RXDIS (0x1<<1)
alexan_e 0:05d110ee258e 57 #define RS485_AADEN (0x1<<2)
alexan_e 0:05d110ee258e 58 #define RS485_SEL (0x1<<3)
alexan_e 0:05d110ee258e 59 #define RS485_DCTRL (0x1<<4)
alexan_e 0:05d110ee258e 60 #define RS485_OINV (0x1<<5)
alexan_e 0:05d110ee258e 61
alexan_e 0:05d110ee258e 62 void ModemInit( void );
alexan_e 0:05d110ee258e 63 void UARTInit(uint32_t Baudrate);
alexan_e 0:05d110ee258e 64 void UART_IRQHandler(void);
alexan_e 0:05d110ee258e 65 void UARTSend(uint8_t *BufferPtr, uint32_t Length);
alexan_e 0:05d110ee258e 66 void print_string( uint8_t *str_ptr );
alexan_e 0:05d110ee258e 67 uint8_t get_key( void );
alexan_e 0:05d110ee258e 68
alexan_e 0:05d110ee258e 69 #endif /* end __UART_H */
alexan_e 0:05d110ee258e 70 /*****************************************************************************
alexan_e 0:05d110ee258e 71 ** End Of File
alexan_e 0:05d110ee258e 72 ******************************************************************************/