5
Last change
on this file since fbcd7c8f was
d7d66d7,
checked in by Sebastian Huber <sebastian.huber@…>, on 04/19/18 at 04:28:01
|
bsps: Move console drivers to bsps
This patch is a part of the BSP source reorganization.
Update #3285.
|
-
Property mode set to
100644
|
File size:
700 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Multi UART console serial I/O. |
---|
3 | * |
---|
4 | * TO DO: Add DMA input/output |
---|
5 | */ |
---|
6 | |
---|
7 | #include <stdio.h> |
---|
8 | #include <fcntl.h> |
---|
9 | #include <rtems/libio.h> |
---|
10 | #include <rtems/termiostypes.h> |
---|
11 | #include <termios.h> |
---|
12 | #include <bsp.h> |
---|
13 | #include <malloc.h> |
---|
14 | |
---|
15 | #include <rtems/bspIo.h> |
---|
16 | |
---|
17 | static void _BSP_null_char(char c) |
---|
18 | { |
---|
19 | int level; |
---|
20 | |
---|
21 | rtems_interrupt_disable(level); |
---|
22 | while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0) |
---|
23 | continue; |
---|
24 | MCF_UART_UTB(CONSOLE_PORT) = c; |
---|
25 | while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0) |
---|
26 | continue; |
---|
27 | rtems_interrupt_enable(level); |
---|
28 | } |
---|
29 | |
---|
30 | BSP_output_char_function_type BSP_output_char = _BSP_null_char; |
---|
31 | BSP_polling_getchar_function_type BSP_poll_char = NULL; |
---|
32 | |
---|
Note: See
TracBrowser
for help on using the repository browser.