source: rtems/c/src/lib/libbsp/arm/lm3s69xx/console/console-config.c @ d2e0bb3

4.115
Last change on this file since d2e0bb3 was 8bed603, checked in by Sebastian Huber <sebastian.huber@…>, on 06/03/13 at 08:03:44

bsp/lm3s69xx: Typos

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 * Copyright © 2013 Eugeniy Meshcheryakov <eugen@debian.org>
3 *
4 * Copyright (c) 2011 Sebastian Huber.  All rights reserved.
5 *
6 *  embedded brains GmbH
7 *  Obere Lagerstr. 30
8 *  82178 Puchheim
9 *  Germany
10 *  <rtems@embedded-brains.de>
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.com/license/LICENSE.
15 */
16
17#include <rtems/bspIo.h>
18
19#include <libchip/serial.h>
20
21#include <bspopts.h>
22#include <bsp/irq.h>
23#include <bsp/uart.h>
24#include <bsp/lm3s69xx.h>
25
26console_tbl Console_Configuration_Ports [] = {
27  #ifdef LM3S69XX_ENABLE_UART_0
28    {
29      .sDeviceName = "/dev/ttyS0",
30      .deviceType = SERIAL_CUSTOM,
31      .pDeviceFns = &lm3s69xx_uart_fns,
32      .ulCtrlPort1 = LM3S69XX_UART_0_BASE,
33      .ulClock = LM3S69XX_UART_BAUD,
34      .ulIntVector = LM3S69XX_IRQ_UART_0,
35      .pDeviceParams = (void *)0
36    },
37  #endif
38  #ifdef LM3S69XX_ENABLE_UART_1
39    {
40      .sDeviceName = "/dev/ttyS1",
41      .deviceType = SERIAL_CUSTOM,
42      .pDeviceFns = &lm3s69xx_uart_fns,
43      .ulCtrlPort1 = LM3S69XX_UART_1_BASE,
44      .ulClock = LM3S69XX_UART_BAUD,
45      .ulIntVector = LM3S69XX_IRQ_UART_1,
46      .pDeviceParams = (void *)1
47    },
48  #endif
49  #ifdef LM3S69XX_ENABLE_UART_2
50    {
51      .sDeviceName = "/dev/ttyS2",
52      .deviceType = SERIAL_CUSTOM,
53      .pDeviceFns = &lm3s69xx_uart_fns,
54      .ulCtrlPort1 = LM3S69XX_UART_2_BASE,
55      .ulClock = LM3S69XX_UART_BAUD,
56      .ulIntVector = LM3S69XX_IRQ_UART_2,
57      .pDeviceParams = (void *)2
58    }
59  #endif
60};
61
62#define PORT_COUNT \
63  (sizeof(Console_Configuration_Ports) \
64    / sizeof(Console_Configuration_Ports [0]))
65
66unsigned long Console_Configuration_Count = PORT_COUNT;
67
68static void output_char(char c)
69{
70  const console_fns *con =
71    Console_Configuration_Ports [Console_Port_Minor].pDeviceFns;
72
73  if (c == '\n') {
74    con->deviceWritePolled((int) Console_Port_Minor, '\r');
75  }
76  con->deviceWritePolled((int) Console_Port_Minor, c);
77}
78
79BSP_output_char_function_type BSP_output_char = output_char;
80
81BSP_polling_getchar_function_type BSP_poll_char = NULL;
Note: See TracBrowser for help on using the repository browser.