From 6fa57f0ffdf64586ead5d184781ae6b471e503b9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 1 May 2007 00:28:53 +0000 Subject: [PATCH] Low level UART support git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@196 42af7a65-404d-4744-a932-0658087f49c3 --- configs/mcu123-lpc214x/defconfig | 29 ++++++++++++++++++++++++++ configs/mcu123-lpc214x/include/board.h | 16 ++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/configs/mcu123-lpc214x/defconfig b/configs/mcu123-lpc214x/defconfig index 73888e9227..8cfc96dc39 100644 --- a/configs/mcu123-lpc214x/defconfig +++ b/configs/mcu123-lpc214x/defconfig @@ -78,6 +78,35 @@ CONFIG_BCFG1_SETUP=n CONFIG_BCFG2_SETUP=n CONFIG_BCFG3_SETUP=n +# +# LPC214X specific device driver settings +# +# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the +# console and ttys0 (default is the UART0). +# CONFIG_UARTn_RXBUFSIZE - Characters are buffered as received. +# This specific the size of the receive buffer +# CONFIG_UARTn_TXBUFSIZE - Characters are buffered before +# being sent. This specific the size of the transmit buffer +# CONFIG_UARTn_BAUD - The configure BAUD of the UART. Must be +# CONFIG_UARTn_BITS - The number of bits. Must be either 7 or 8. +# CONFIG_UARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity, 3=mark 1, 4=space 0 +# CONFIG_UARTn_2STOP - Two stop bits +# +CONFIG_UART0_SERIAL_CONSOLE=y +CONFIG_UART1_SERIAL_CONSOLE=n +CONFIG_UART0_TXBUFSIZE=256 +CONFIG_UART1_TXBUFSIZE=256 +CONFIG_UART0_RXBUFSIZE=256 +CONFIG_UART1_RXBUFSIZE=256 +CONFIG_UART0_BAUD=115200 +CONFIG_UART1_BAUD=115200 +CONFIG_UART0_BITS=8 +CONFIG_UART1_BITS=8 +CONFIG_UART0_PARITY=0 +CONFIG_UART1_PARITY=0 +CONFIG_UART0_2STOP=n +CONFIG_UART1_2STOP=n + # # General OS setup # diff --git a/configs/mcu123-lpc214x/include/board.h b/configs/mcu123-lpc214x/include/board.h index 2ed4d0a8b8..5fd69c3aa9 100644 --- a/configs/mcu123-lpc214x/include/board.h +++ b/configs/mcu123-lpc214x/include/board.h @@ -50,6 +50,22 @@ /* Clocking *************************************************/ +#define LPC214X_FOSC 12000000 +#define LPC214X_PLL_M 5 +#define LPC214X_MSEL (PLL_M-1) +#define LPC214X_PLL_P 2 + +#define LPC214X_PSEL0 5 +#define LPC214X_PSEL1 6 + +#define LPC214X_PLLE 0 +#define LPC214X_PLLC 1 + +#define LPC214X_PLOCK 10 + +#define LPC214X_PLL_FEED1 0xaa +#define LPC214X_PLL_FEED2 0x55 + /* LED definitions ******************************************/ /************************************************************