4.104.114.84.95
Last change
on this file since 68c498f4 was
68c498f4,
checked in by Joel Sherrill <joel.sherrill@…>, on 06/12/00 at 16:34:46
|
Added i960sim BSP which (ignoring the 3 instructions not supported
by gdb 5.0's i960 simulator) is enough to run hello world.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[68c498f4] | 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 | /* external prototypes for monitor interface routines */ |
---|
| 22 | |
---|
| 23 | void outbyte( char ); |
---|
| 24 | char inbyte( void ); |
---|
| 25 | |
---|
| 26 | /* |
---|
| 27 | * console_outbyte_polled |
---|
| 28 | * |
---|
| 29 | * This routine transmits a character using polling. |
---|
| 30 | */ |
---|
| 31 | |
---|
| 32 | void console_outbyte_polled( |
---|
| 33 | int port, |
---|
| 34 | char ch |
---|
| 35 | ) |
---|
| 36 | { |
---|
| 37 | int status; |
---|
| 38 | int nwritten; |
---|
| 39 | |
---|
| 40 | status = _sys_write (1, &ch, 1, &nwritten); |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | /* |
---|
| 44 | * console_inbyte_nonblocking |
---|
| 45 | * |
---|
| 46 | * This routine polls for a character. |
---|
| 47 | */ |
---|
| 48 | |
---|
| 49 | int console_inbyte_nonblocking( |
---|
| 50 | int port |
---|
| 51 | ) |
---|
| 52 | { |
---|
| 53 | int status; |
---|
| 54 | int nread; |
---|
| 55 | char c; |
---|
| 56 | |
---|
| 57 | status = _sys_read (0, &c, 1, &nread); |
---|
| 58 | if ( status == 0 ) |
---|
| 59 | return c; |
---|
| 60 | return -1; |
---|
| 61 | } |
---|
| 62 | |
---|
Note: See
TracBrowser
for help on using the repository browser.