Changeset 6dcf06e in rtems


Ignore:
Timestamp:
Aug 18, 2008, 4:47:54 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
f73fc29
Parents:
e49bb542
Message:

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

  • Makefile.am, console/console.c: Split debug IO code into separate file.
  • console/debugio.c: New file.
Location:
c/src/lib/libbsp/m68k/mcf52235
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mcf52235/ChangeLog

    re49bb542 r6dcf06e  
     12008-08-18      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * Makefile.am, console/console.c: Split debug IO code into separate
     4        file.
     5        * console/debugio.c: New file.
     6
    172008-06-19      Matthew Riek <matthew.riek@ibiscomputer.com.au>
    28
  • c/src/lib/libbsp/m68k/mcf52235/Makefile.am

    re49bb542 r6dcf06e  
    3636clock_SOURCES = clock/clock.c
    3737console_SOURCES = console/console.c
     38debugio_SOURCES = console/debugio.c
    3839timer_SOURCES = timer/timer.c
    3940
     
    4950noinst_LIBRARIES = libbsp.a
    5051libbsp_a_SOURCES = $(startup_SOURCES) $(clock_SOURCES) $(console_SOURCES) \
    51     $(timer_SOURCES)
     52    $(debugio_SOURCES) $(timer_SOURCES)
    5253
    5354libbsp_a_LIBADD = \
  • c/src/lib/libbsp/m68k/mcf52235/console/console.c

    re49bb542 r6dcf06e  
    2525static int IntUartPollWrite(int minor, const char *buf, int len);
    2626static int IntUartInterruptWrite(int minor, const char *buf, int len);
    27 
    28 static void _BSP_null_char(char c)
    29 {
    30   int level;
    31 
    32   if (c == '\n')
    33     _BSP_null_char('\r');
    34   rtems_interrupt_disable(level);
    35   while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
    36     continue;
    37   MCF_UART_UTB(CONSOLE_PORT) = c;
    38   while ((MCF_UART_USR(CONSOLE_PORT) & MCF_UART_USR_TXRDY) == 0)
    39     continue;
    40   rtems_interrupt_enable(level);
    41 }
    42 
    43 BSP_output_char_function_type BSP_output_char = _BSP_null_char;
    4427
    4528#define MAX_UART_INFO     3
     
    671654  return (rtems_termios_ioctl(arg));
    672655}
    673 int DEBUG_OUTCHAR(int c)
    674 {
    675   if (c == '\n')
    676     DEBUG_OUTCHAR('\r');
    677   _BSP_null_char(c);
    678   return c;
    679 }
    680 void DEBUG_OUTSTR(const char *msg)
    681 {
    682   while (*msg)
    683     DEBUG_OUTCHAR(*msg++);
    684 }
    685 void DEBUG_OUTNUM(int i)
    686 {
    687   int n;
    688   static const char map[] = "0123456789ABCDEF";
    689 
    690   DEBUG_OUTCHAR(' ');
    691   for (n = 28; n >= 0; n -= 4)
    692     DEBUG_OUTCHAR(map[(i >> n) & 0xF]);
    693 }
Note: See TracChangeset for help on using the changeset viewer.