OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [lib/] [libbsp/] [c4x/] [c4xsim/] [console/] [debugio.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
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
 *  debugio.c,v 1.1 2000/02/22 18:39:51 joel Exp
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
 
29
void 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
 
40
C4X_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
 
51
int console_inbyte_nonblocking( int port )
52
{
53
  char c;
54
  sim_read(1, &c, 1);
55
  return c;
56
}
57
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.