source: rtems/c/src/lib/libbsp/m68k/mcf52235/console/debugio.c @ 6dcf06e

4.104.114.9
Last change on this file since 6dcf06e was 6dcf06e, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 18, 2008 at 4:47:54 PM

2008-08-18 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, console/console.c: Split debug IO code into separate file.
  • console/debugio.c: New file.
  • Property mode set to 100644
File size: 666 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#include <rtems/mw_uid.h>
15
16#include <rtems/bspIo.h>
17
18static void _BSP_null_char(char c)
19{
20  int level;
21
22  rtems_interrupt_disable(level);
23  while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
24    continue;
25  MCF_UART_UTB(CONSOLE_PORT) = c;
26  while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
27    continue;
28  rtems_interrupt_enable(level);
29}
30
31BSP_output_char_function_type BSP_output_char = _BSP_null_char;
32
Note: See TracBrowser for help on using the repository browser.