source: rtems/c/src/lib/libbsp/m68k/sim68000/console/conscfg.c @ e1ddcec0

4.115
Last change on this file since e1ddcec0 was e1ddcec0, checked in by Jennifer Averett <Jennifer.Averett@…>, on 10/18/11 at 18:35:25

2011-10-18 Jennifer Averett <Jennifer.Averett@…>

PR 1917/bsps

  • Makefile.am, console/conscfg.c: Modifications to add dynamic tables for libchip serial drivers.
  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 *  This file contains the TTY driver table.
3 *
4 *  COPYRIGHT (c) 1989-2000.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#include <bsp.h>
15#include <bspopts.h>
16
17#include <libchip/serial.h>
18#include <libchip/mc68681.h>
19
20/*
21 *  Fix these for the simulator
22 */
23
24#define MC68681_PORT_CONFIG  MC68681_XBRG_IGNORED
25#define MC68681_PROBE        libchip_serial_default_probe
26#define MC68681_VECTOR       0
27#define MC68681_BASE_ADDRESS 0x71001
28#define MC68681_DATA_ADDRESS 0x71007
29
30/*
31 *  Based on BSP configuration information decide whether to do polling IO
32 *  or interrupt driven IO.
33 */
34
35#if (CONSOLE_USE_INTERRUPTS)
36#define MC68681_FUNCTIONS &mc68681_fns
37#else
38#define MC68681_FUNCTIONS &mc68681_fns_polled
39#endif
40
41console_tbl  Console_Configuration_Ports[] = {
42  {
43    "/dev/com0",                        /* sDeviceName */
44    SERIAL_MC68681,                     /* deviceType */
45    MC68681_FUNCTIONS,                  /* pDeviceFns */
46    NULL,                               /* deviceProbe */
47    NULL,                               /* pDeviceFlow */
48    16,                                 /* ulMargin */
49    8,                                  /* ulHysteresis */
50    (void *)9600,                       /* pDeviceParams */
51    MC68681_BASE_ADDRESS,               /* ulCtrlPort1 */
52    MC68681_BASE_ADDRESS,               /* ulCtrlPort2 */
53    MC68681_DATA_ADDRESS,               /* ulDataPort */
54    mc68681_get_register_2,             /* getRegister */
55    mc68681_set_register_2,             /* setRegister */
56    NULL, /* unused */                  /* getData */
57    NULL, /* unused */                  /* setData */
58    (uint32_t)mc68681_baud_rate_table,  /* ulClock */
59    MC68681_VECTOR                      /* ulIntVector */
60  }
61};
62
63/*
64 *  Declare some information used by the console driver
65 */
66
67#define NUM_CONSOLE_PORTS (sizeof(Console_Configuration_Ports)/sizeof(console_tbl))
68
69unsigned long  Console_Configuration_Count = NUM_CONSOLE_PORTS;
Note: See TracBrowser for help on using the repository browser.