source: rtems/c/src/lib/libbsp/c4x/c4xsim/console/debugio.c @ 94e79c6

Last change on this file since 94e79c6 was 94e79c6, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 4, 2003 at 6:43:54 PM

2003-09-04 Joel Sherrill <joel@…>

  • clock/clock.c, console/console.c, console/consolereserveresources.c, console/debugio.c, include/bsp.h, startup/bspstart.c, startup/spurious.c, timer/timer.c: URL for license changed.
  • Property mode set to 100644
File size: 963 bytes
Line 
1/*
2 *  This file contains the TTY driver for the serial ports on the erc32.
3 *
4 *  This driver uses the termios pseudo driver.
5 *
6 *  COPYRIGHT (c) 1989-1999.
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#include <rtems/libio.h>
18#include <stdlib.h>
19#include <assert.h>
20
21#include <simio.h>
22
23/*
24 *  console_outbyte_polled
25 *
26 *  This routine transmits a character using polling.
27 */
28
29void console_outbyte_polled(
30  int  port,
31  char ch
32)
33{
34  char out[2];
35  out[0] = ch;
36  out[1] = 0;
37  sim_write(1, out, 1);
38}
39
40C4X_BSP_output_char( int c )
41{
42  console_outbyte_polled( 0, (char) c );
43}
44
45/*
46 *  console_inbyte_nonblocking
47 *
48 *  This routine polls for a character.
49 */
50
51int console_inbyte_nonblocking( int port )
52{
53  char c;
54  sim_read(1, &c, 1);
55  return c;
56}
57
Note: See TracBrowser for help on using the repository browser.