source: rtems/c/src/lib/libbsp/m68k/mcf52235/console/debugio.c @ 098a819e

5
Last change on this file since 098a819e was b2c02c74, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 3, 2010 at 2:15:54 PM

2010-08-03 Joel Sherrill <joel.sherrilL@…>

  • console/debugio.c: Add BSP_poll_char.
  • Property mode set to 100644
File size: 726 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;
32BSP_polling_getchar_function_type BSP_poll_char = NULL;
33
Note: See TracBrowser for help on using the repository browser.