source: rtems/c/src/lib/libbsp/arm/lpc24xx/console/uart-probe-2.c @ 991fdb33

4.115
Last change on this file since 991fdb33 was 6ec438e, checked in by Sebastian Huber <sebastian.huber@…>, on 10/07/14 at 06:29:16

libchip/serial: Add alternative NS16550 driver

Use the Termios device API.

  • Property mode set to 100644
File size: 865 bytes
RevLine 
[6a22637]1/**
2 * @file
3 *
4 * @ingroup lpc24xx
5 *
6 * @brief UART 2 probe.
7 */
8
9/*
[6ec438e]10 * Copyright (c) 2011-2014 embedded brains GmbH.  All rights reserved.
[6a22637]11 *
12 *  embedded brains GmbH
[6ec438e]13 *  Dornierstr. 4
[6a22637]14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
[c499856]20 * http://www.rtems.org/license/LICENSE.
[6a22637]21 */
22
[6ec438e]23#include <libchip/ns16550.h>
24
[6a22637]25#include <bsp.h>
26#include <bsp/io.h>
27
[6ec438e]28bool lpc24xx_uart_probe_2(rtems_termios_device_context *context)
[6a22637]29{
30  static const lpc24xx_pin_range pins [] = {
31    LPC24XX_PIN_UART_2_TXD_P0_10,
32    LPC24XX_PIN_UART_2_RXD_P0_11,
33    LPC24XX_PIN_TERMINAL
34  };
35
36  lpc24xx_module_enable(LPC24XX_MODULE_UART_2, LPC24XX_MODULE_PCLK_DEFAULT);
37  lpc24xx_pin_config(&pins [0], LPC24XX_PIN_SET_FUNCTION);
38
[6ec438e]39  return ns16550_probe(context);
[6a22637]40}
Note: See TracBrowser for help on using the repository browser.