source: rtems/c/src/lib/libbsp/i386/pc386/console/printk_support.c @ 1c0b8d7

4.115
Last change on this file since 1c0b8d7 was 1c0b8d7, checked in by Jennifer Averett <Jennifer.Averett@…>, on Nov 18, 2011 at 8:11:08 PM

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

PR 1925

  • Makefile.am, preinstall.am, console/serial_mouse_config.c, include/bsp.h, start/start.S: Converted 1386 console to the libchip style console
  • console/conscfg.c, console/console_control.c, console/printk_support.c, console/vgacons.c, console/vgacons.h: New files.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  This file contains a stub for the required printk support.
3 *  It is NOT functional!!!
4 *
5 *  This driver uses the termios pseudo driver.
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2007.
10 *  On-Line Applications Research Corporation (OAR).
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 *  $Id$
17 */
18
19#include <rtems.h>
20#include <rtems/bspIo.h>
21#include <rtems/keyboard.h>
22#include <bsp.h>
23#include <libchip/serial.h>
24#include <libchip/ns16550.h>
25
26BSP_output_char_function_type     BSP_output_char = _IBMPC_outch;
27BSP_polling_getchar_function_type BSP_poll_char = BSP_wait_polled_input;
28
29rtems_device_minor_number         BSPPrintkPort = 0;
30
31int ns16550_inbyte_nonblocking_polled(
32  int minor
33);
34
35void BSP_com_outch(char ch)
36{
37  console_tbl                   *cptr;
38
39  cptr = &Console_Configuration_Ports[BSPPrintkPort];
40
41  return cptr->pDeviceFns->deviceWritePolled( BSPPrintkPort, ch );
42}
43
44int BSP_com_inch( void ) 
45{
46  int           result;
47  console_tbl   *cptr;
48
49  cptr = &Console_Configuration_Ports[BSPPrintkPort];
50
51  do {
52    result = ns16550_inbyte_nonblocking_polled( BSPPrintkPort );
53  } while (result == -1);
54
55  return result;
56}
57
Note: See TracBrowser for help on using the repository browser.