Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:47

0001  /*
0002   *  Multi UART console serial I/O.
0003   *
0004   * TO DO: Add DMA input/output
0005   */
0006 
0007 #include <stdio.h>
0008 #include <fcntl.h>
0009 #include <rtems/libio.h>
0010 #include <rtems/termiostypes.h>
0011 #include <termios.h>
0012 #include <bsp.h>
0013 #include <malloc.h>
0014 
0015 #include <rtems/bspIo.h>
0016 
0017 static void _BSP_null_char(char c)
0018 {
0019   int level;
0020 
0021   rtems_interrupt_disable(level);
0022   while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
0023     continue;
0024   MCF_UART_UTB(CONSOLE_PORT) = c;
0025   while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
0026     continue;
0027   rtems_interrupt_enable(level);
0028 }
0029 
0030 BSP_output_char_function_type     BSP_output_char = _BSP_null_char;
0031 BSP_polling_getchar_function_type BSP_poll_char = NULL;
0032