Files
rtems/bsps/m68k/mcf52235/console/debugio.c
Sebastian Huber d7d66d7d45 bsps: Move console drivers to bsps
This patch is a part of the BSP source reorganization.

Update #3285.
2018-04-20 13:08:32 +02:00

33 lines
700 B
C

/*
* Multi UART console serial I/O.
*
* TO DO: Add DMA input/output
*/
#include <stdio.h>
#include <fcntl.h>
#include <rtems/libio.h>
#include <rtems/termiostypes.h>
#include <termios.h>
#include <bsp.h>
#include <malloc.h>
#include <rtems/bspIo.h>
static void _BSP_null_char(char c)
{
int level;
rtems_interrupt_disable(level);
while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
continue;
MCF_UART_UTB(CONSOLE_PORT) = c;
while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
continue;
rtems_interrupt_enable(level);
}
BSP_output_char_function_type BSP_output_char = _BSP_null_char;
BSP_polling_getchar_function_type BSP_poll_char = NULL;