source: rtems/c/src/lib/libbsp/i960/i960sim/console/console-io.c @ 90dccce

4.104.114.84.95
Last change on this file since 90dccce was dbe4dc9, checked in by Joel Sherrill <joel.sherrill@…>, on 01/03/01 at 16:54:52

2001-01-03 Joel Sherrill <joel@…>

  • console/console-io.c: Added console_initialize_hardware().
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  This file contains the hardware specific portions of the TTY driver
3 *  for the serial ports on the erc32.
4 *
5 *  COPYRIGHT (c) 1989-1997.
6 *  On-Line Applications Research Corporation (OAR).
7 *  Copyright assigned to U.S. Government, 1994.
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.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#include <bsp.h>
17#include <rtems/libio.h>
18#include <stdlib.h>
19#include <assert.h>
20
21/*
22 *  console_initialize_hardware
23 *
24 *  This routine initializes the console hardware.
25 *
26 */
27
28void console_initialize_hardware(void)
29{
30  return;
31}
32
33/*
34 *  console_outbyte_polled
35 *
36 *  This routine transmits a character using polling.
37 */
38
39void console_outbyte_polled(
40  int  port,
41  char ch
42)
43{
44  int status;
45  int nwritten;
46
47  status = _sys_write (1, &ch, 1, &nwritten);
48}
49
50/*
51 *  console_inbyte_nonblocking
52 *
53 *  This routine polls for a character.
54 */
55
56int console_inbyte_nonblocking(
57  int port
58)
59{
60  int status;
61  int nread;
62  char c;
63
64  status = _sys_read (0, &c, 1, &nread);
65  if ( status == 0 )
66    return c;
67  return -1;
68}
69
Note: See TracBrowser for help on using the repository browser.