source: rtems/bsps/arm/lpc24xx/console/uart-probe-2.c @ ba619b7f

Last change on this file since ba619b7f was ba619b7f, checked in by Joel Sherrill <joel@…>, on 03/01/22 at 21:38:20

bsps/arm/: Scripted embedded brains header file clean up

Updates #4625.

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