From 6a22637506aba6b409045172cc7a3d994930a8e1 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 8 Feb 2013 14:23:22 +0100 Subject: bsp/lpc24xx: Move UART probes to separate files --- .../lib/libbsp/arm/lpc24xx/console/uart-probe-1.c | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 c/src/lib/libbsp/arm/lpc24xx/console/uart-probe-1.c (limited to 'c/src/lib/libbsp/arm/lpc24xx/console/uart-probe-1.c') 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 + * + * + * 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 +#include + +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; +} -- cgit v1.2.3