diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-02-08 14:23:22 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-02-11 14:44:47 +0100 |
commit | 6a22637506aba6b409045172cc7a3d994930a8e1 (patch) | |
tree | 19a1f33d9458d9aa5001cf11a278e6a2afac80af /c/src/lib/libbsp/arm/lpc24xx/console/uart-probe-1.c | |
parent | libchip/serial: Make NS16550 handler public (diff) | |
download | rtems-6a22637506aba6b409045172cc7a3d994930a8e1.tar.bz2 |
bsp/lpc24xx: Move UART probes to separate files
Diffstat (limited to 'c/src/lib/libbsp/arm/lpc24xx/console/uart-probe-1.c')
-rw-r--r-- | c/src/lib/libbsp/arm/lpc24xx/console/uart-probe-1.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/lpc24xx/console/uart-probe-1.c b/c/src/lib/libbsp/arm/lpc24xx/console/uart-probe-1.c new file mode 100644 index 0000000000..94a5d2e44c --- /dev/null +++ b/c/src/lib/libbsp/arm/lpc24xx/console/uart-probe-1.c @@ -0,0 +1,38 @@ +/** + * @file + * + * @ingroup lpc24xx + * + * @brief UART 1 probe. + */ + +/* + * Copyright (c) 2011-2013 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Obere Lagerstr. 30 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + */ + +#include <bsp.h> +#include <bsp/io.h> + +bool lpc24xx_uart_probe_1(int minor) +{ + static const lpc24xx_pin_range pins [] = { + LPC24XX_PIN_UART_1_TXD_P0_15, + LPC24XX_PIN_UART_1_RXD_P0_16, + LPC24XX_PIN_TERMINAL + }; + + lpc24xx_module_enable(LPC24XX_MODULE_UART_1, LPC24XX_MODULE_PCLK_DEFAULT); + lpc24xx_pin_config(&pins [0], LPC24XX_PIN_SET_FUNCTION); + + return true; +} |