4.115
Last change
on this file since ae55da72 was
9b4422a2,
checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24
|
Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.
+ remove occurrences of two blank comment lines
next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
contain CVS Ids
+ If the processing left a blank line at the top of
a file, it was removed.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
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-2008. |
---|
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.rtems.com/license/LICENSE. |
---|
11 | */ |
---|
12 | |
---|
13 | #include <bsp.h> |
---|
14 | #include <rtems/libio.h> |
---|
15 | #include <stdlib.h> |
---|
16 | #include <assert.h> |
---|
17 | |
---|
18 | static void |
---|
19 | __outb(int port, unsigned char v) |
---|
20 | { |
---|
21 | *((volatile unsigned char *)(0x80000000 + port)) = v; |
---|
22 | } |
---|
23 | |
---|
24 | static unsigned char |
---|
25 | __inb(int port) |
---|
26 | { |
---|
27 | return *((volatile unsigned char *)(0x80000000 + port)); |
---|
28 | } |
---|
29 | |
---|
30 | /* |
---|
31 | * console_initialize_hardware |
---|
32 | * |
---|
33 | * This routine initializes the console hardware. |
---|
34 | * |
---|
35 | */ |
---|
36 | void console_initialize_hardware(void) |
---|
37 | { |
---|
38 | return; |
---|
39 | } |
---|
40 | |
---|
41 | /* |
---|
42 | * console_outbyte_polled |
---|
43 | * |
---|
44 | * This routine transmits a character using polling. |
---|
45 | */ |
---|
46 | void console_outbyte_polled( |
---|
47 | int port, |
---|
48 | char ch |
---|
49 | ) |
---|
50 | { |
---|
51 | __outb(0x3f8 + 0x00, ch); |
---|
52 | } |
---|
53 | |
---|
54 | /* |
---|
55 | * console_inbyte_nonblocking |
---|
56 | * |
---|
57 | * This routine polls for a character. |
---|
58 | */ |
---|
59 | int console_inbyte_nonblocking( |
---|
60 | int port |
---|
61 | ) |
---|
62 | { |
---|
63 | |
---|
64 | if ( __inb(0x3f8 + 0x05) & 0x01 ) |
---|
65 | return __inb(0x3f8 + 0x00); |
---|
66 | return -1; |
---|
67 | } |
---|
68 | |
---|
69 | #include <rtems/bspIo.h> |
---|
70 | |
---|
71 | void simBSP_output_char(char c) { console_outbyte_polled( 0, c ); } |
---|
72 | |
---|
73 | BSP_output_char_function_type BSP_output_char = simBSP_output_char; |
---|
74 | BSP_polling_getchar_function_type BSP_poll_char = NULL; |
---|
Note: See
TracBrowser
for help on using the repository browser.