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

4.104.114.84.95
Last change on this file since dc90de4 was dc90de4, checked in by Joel Sherrill <joel.sherrill@…>, on 10/12/01 at 21:07:58

2001-10-12 Joel Sherrill <joel@…>

  • console/console-io.c: Fixed typo.
  • 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 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14
15#include <bsp.h>
16#include <rtems/libio.h>
17#include <stdlib.h>
18#include <assert.h>
19
20/*
21 *  console_initialize_hardware
22 *
23 *  This routine initializes the console hardware.
24 *
25 */
26
27void console_initialize_hardware(void)
28{
29  return;
30}
31
32/*
33 *  console_outbyte_polled
34 *
35 *  This routine transmits a character using polling.
36 */
37
38void console_outbyte_polled(
39  int  port,
40  char ch
41)
42{
43  int status;
44  int nwritten;
45
46  status = _sys_write (1, &ch, 1, &nwritten);
47}
48
49/*
50 *  console_inbyte_nonblocking
51 *
52 *  This routine polls for a character.
53 */
54
55int console_inbyte_nonblocking(
56  int port
57)
58{
59  int status;
60  int nread;
61  char c;
62
63  status = _sys_read (0, &c, 1, &nread);
64  if ( status == 0 )
65    return c;
66  return -1;
67}
68
Note: See TracBrowser for help on using the repository browser.