source: rtems/c/src/lib/libbsp/c4x/c4xsim/console/debugio.c @ 61ba9763

4.104.114.84.95
Last change on this file since 61ba9763 was 61ba9763, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 22, 2000 at 6:39:52 PM

New port of RTEMS to TI C3x and C4x.

  • Property mode set to 100644
File size: 968 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.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#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.