4.104.114.84.95
Last change
on this file since e177810d was
e177810d,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/03/01 at 17:52:36
|
2001-01-03 Joel Sherrill <joel@…>
- clock/clock.c: Use shared clock driver shell.
- console/console.c: Removed. Now use shared polling shell.
- console/console-io.c: New file.
- console/Makefile.am: Correct to use shared polling shell.
- startup/bspstart.c: Remove all fast idle references.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[e177810d] | 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-2000. |
---|
| 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 | |
---|
| 27 | void console_initialize_hardware(void) |
---|
| 28 | { |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | /* external prototypes for monitor interface routines */ |
---|
| 32 | |
---|
| 33 | void outbyte( char ); |
---|
| 34 | char inbyte( void ); |
---|
| 35 | |
---|
| 36 | /* |
---|
| 37 | * console_outbyte_polled |
---|
| 38 | * |
---|
| 39 | * This routine transmits a character using polling. |
---|
| 40 | */ |
---|
| 41 | |
---|
| 42 | void console_outbyte_polled( |
---|
| 43 | int port, |
---|
| 44 | char ch |
---|
| 45 | ) |
---|
| 46 | { |
---|
| 47 | outbyte( ch ); |
---|
| 48 | } |
---|
| 49 | |
---|
| 50 | /* |
---|
| 51 | * console_inbyte_nonblocking |
---|
| 52 | * |
---|
| 53 | * This routine polls for a character. |
---|
| 54 | */ |
---|
| 55 | |
---|
| 56 | int console_inbyte_nonblocking( |
---|
| 57 | int port |
---|
| 58 | ) |
---|
| 59 | { |
---|
| 60 | char c; |
---|
| 61 | |
---|
| 62 | c = inbyte(); |
---|
| 63 | if (!c) |
---|
| 64 | return -1; |
---|
| 65 | return c; |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | /* |
---|
| 69 | * To support printk |
---|
| 70 | */ |
---|
| 71 | |
---|
| 72 | #include <bspIo.h> |
---|
| 73 | |
---|
| 74 | void PSIM_output_char(char c) { console_outbyte_polled( 0, c ); } |
---|
| 75 | |
---|
| 76 | BSP_output_char_function_type BSP_output_char = PSIM_output_char; |
---|
| 77 | BSP_polling_getchar_function_type BSP_poll_char = NULL; |
---|
| 78 | |
---|
Note: See
TracBrowser
for help on using the repository browser.