source: rtems/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c @ cba119c9

4.104.114.84.95
Last change on this file since cba119c9 was f05b2ac, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/21/04 at 16:01:48

Remove duplicate white lines.

  • Property mode set to 100644
File size: 3.3 KB
Line 
1/*
2 *  This file contains the libchip configuration information
3 *  to instantiate the libchip driver for the on-CPU DUART
4 *  and any other serial ports in the system.
5 *
6 *  COPYRIGHT (c) 1989-2001.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#include <bsp.h>
17
18#include <libchip/serial.h>
19#include <libchip/mg5uart.h>
20
21/* #define CONSOLE_USE_INTERRUPTS */
22
23#ifdef CONSOLE_USE_INTERRUPTS
24#define MG5UART_FUNCTIONS &mg5uart_fns
25#else
26#define MG5UART_FUNCTIONS &mg5uart_fns_polled
27#endif
28
29console_tbl     Console_Port_Tbl[] = {
30{
31  "/dev/com0",                             /* sDeviceName */
32   SERIAL_MG5UART,                         /* deviceType */
33   MG5UART_FUNCTIONS,                      /* pDeviceFns */
34   NULL,                                   /* deviceProbe, assume it is there */
35   NULL,                                   /* pDeviceFlow */
36   16,                                     /* ulMargin */
37   8,                                      /* ulHysteresis */
38   (void *) NULL,               /* NULL */ /* pDeviceParams */
39   MONGOOSEV_PERIPHERAL_COMMAND_REGISTER,  /* ulCtrlPort1 */
40   MONGOOSEV_UART0_BASE,                   /* ulCtrlPort2 */
41   MG5UART_UART0,                          /* ulDataPort */
42   NULL,                                   /* getRegister */
43   NULL,                                   /* setRegister */
44   NULL, /* unused */                      /* getData */
45   NULL, /* unused */                      /* setData */
46   CLOCK_RATE,                             /* ulClock */
47   MONGOOSEV_IRQ_UART0_RX_FRAME_ERROR      /* ulIntVector -- base for port */
48},
49{
50  "/dev/com1",                             /* sDeviceName */
51   SERIAL_MG5UART,                         /* deviceType */
52   MG5UART_FUNCTIONS,                      /* pDeviceFns */
53   NULL,                                   /* deviceProbe, assume it is there */
54   NULL,                                   /* pDeviceFlow */
55   16,                                     /* ulMargin */
56   8,                                      /* ulHysteresis */
57   (void *) NULL,               /* NULL */ /* pDeviceParams */
58   MONGOOSEV_PERIPHERAL_COMMAND_REGISTER,  /* ulCtrlPort1 */
59   MONGOOSEV_UART1_BASE,                   /* ulCtrlPort2 */
60   MG5UART_UART1,                          /* ulDataPort */
61   NULL,                                   /* getRegister */
62   NULL,                                   /* setRegister */
63   NULL, /* unused */                      /* getData */
64   NULL, /* unused */                      /* setData */
65   CLOCK_RATE,                             /* ulClock */
66   MONGOOSEV_IRQ_UART1_RX_FRAME_ERROR      /* ulIntVector -- base for port */
67},
68};
69
70/*
71 *  Declare some information used by the console driver
72 */
73
74#define NUM_CONSOLE_PORTS (sizeof(Console_Port_Tbl)/sizeof(console_tbl))
75
76unsigned long  Console_Port_Count = NUM_CONSOLE_PORTS;
77
78console_data  Console_Port_Data[NUM_CONSOLE_PORTS];
79
80rtems_device_minor_number  Console_Port_Minor;
81
82/*
83 *  printk() support that simply routes printk to stderr
84 */
85
86#include <rtems/bspIo.h>
87
88void GENMG5_output_char(char c) { write( 2, &c, 1 ); }
89
90BSP_output_char_function_type           BSP_output_char = GENMG5_output_char;
91BSP_polling_getchar_function_type       BSP_poll_char = NULL;
Note: See TracBrowser for help on using the repository browser.