source: rtems/bsps/m68k/mcf5225x/console/debugio.c @ d7d66d7

5
Last change on this file since d7d66d7 was d7d66d7, checked in by Sebastian Huber <sebastian.huber@…>, on Apr 19, 2018 at 4:28:01 AM

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: 891 bytes
Line 
1/*
2 *  Multi UART console serial I/O.
3 *
4 *  TO DO: Add DMA input/output
5 *
6 *  The license and distribution terms for this file may be
7 *  found in the file LICENSE in this distribution or at
8 *  http://www.rtems.org/license/LICENSE.
9 */
10
11#include <stdio.h>
12#include <fcntl.h>
13#include <rtems/libio.h>
14#include <rtems/termiostypes.h>
15#include <termios.h>
16#include <bsp.h>
17#include <malloc.h>
18
19#include <rtems/bspIo.h>
20
21static void _BSP_null_char(char c)
22{
23  rtems_interrupt_level level=UART0_IRQ_LEVEL;
24
25  rtems_interrupt_disable(level);
26  while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
27    continue;
28  MCF_UART_UTB(CONSOLE_PORT) = c;
29  while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
30    continue;
31  rtems_interrupt_enable(level);
32}
33
34BSP_output_char_function_type     BSP_output_char = _BSP_null_char;
35BSP_polling_getchar_function_type BSP_poll_char = NULL;
Note: See TracBrowser for help on using the repository browser.