4.115
Last change
on this file since 991fdb33 was
6279149,
checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/14 at 21:04:56
|
Add console-polled.h and update all BSPs that should use it.
The file console-polled.h provides the prototypes for the three
required methods when implementing a single port polled console
driver. This paradigm is common on simulators and simple hardware.
+ Updated the BSPs Makefile.am to make console-polled.h available.
+ Regenerated the BSPs preinstall.sm.
+ Updated console support files to include <bsp/console-polled.h>.
+ Updated console support files to make printk() support method static.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[44bb5cd0] | 1 | /* |
---|
| 2 | * COPYRIGHT (c) 1989-2009. |
---|
| 3 | * On-Line Applications Research Corporation (OAR). |
---|
| 4 | * |
---|
| 5 | * The license and distribution terms for this file may be |
---|
| 6 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 7 | * http://www.rtems.org/license/LICENSE. |
---|
[44bb5cd0] | 8 | */ |
---|
| 9 | |
---|
| 10 | #include <bsp.h> |
---|
[6279149] | 11 | #include <bsp/console-polled.h> |
---|
[44bb5cd0] | 12 | #include <rtems/libio.h> |
---|
| 13 | #include <stdlib.h> |
---|
| 14 | #include <assert.h> |
---|
| 15 | |
---|
| 16 | /* |
---|
| 17 | * console_initialize_hardware |
---|
| 18 | * |
---|
| 19 | * This routine initializes the console hardware. |
---|
| 20 | * |
---|
| 21 | */ |
---|
| 22 | void console_initialize_hardware(void) |
---|
| 23 | { |
---|
| 24 | return; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | /* |
---|
| 28 | * console_outbyte_polled |
---|
| 29 | * |
---|
| 30 | * This routine transmits a character using polling. |
---|
| 31 | */ |
---|
| 32 | void console_outbyte_polled( |
---|
| 33 | int port, |
---|
| 34 | char ch |
---|
| 35 | ) |
---|
| 36 | { |
---|
[b3fb2ff] | 37 | gdbarmsim_writec(ch); |
---|
[44bb5cd0] | 38 | } |
---|
| 39 | |
---|
| 40 | /* |
---|
| 41 | * console_inbyte_nonblocking |
---|
| 42 | * |
---|
| 43 | * This routine polls for a character. |
---|
| 44 | */ |
---|
| 45 | |
---|
| 46 | int console_inbyte_nonblocking( |
---|
| 47 | int port |
---|
| 48 | ) |
---|
| 49 | { |
---|
| 50 | return -1; |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | #include <rtems/bspIo.h> |
---|
| 54 | |
---|
[6279149] | 55 | static void MyBSP_output_char(char c) { console_outbyte_polled( 0, c ); } |
---|
[44bb5cd0] | 56 | |
---|
| 57 | BSP_output_char_function_type BSP_output_char = MyBSP_output_char; |
---|
| 58 | BSP_polling_getchar_function_type BSP_poll_char = NULL; |
---|
Note: See
TracBrowser
for help on using the repository browser.