Changeset c6a7b3a in mainline for boot/arch/mips32/src/putchar.c


Ignore:
Timestamp:
2013-03-28T20:39:16Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d1fdcad
Parents:
cc3c27ad (diff), 5d9fce4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/mips32/src/putchar.c

    rcc3c27ad rc6a7b3a  
    3232#include <str.h>
    3333
     34#ifdef PUTCHAR_ADDRESS
     35#undef PUTCHAR_ADDRESS
     36#endif
     37
     38#if defined(MACHINE_msim)
     39#define _putchar(ch)    msim_putchar((ch))
     40static void msim_putchar(const wchar_t ch)
     41{
     42        *((char *) MSIM_VIDEORAM_ADDRESS) = ch;
     43}
     44#endif
     45
     46#if defined(MACHINE_lmalta) || defined(MACHINE_bmalta)
     47#define _putchar(ch)    yamon_putchar((ch))
     48typedef void (**yamon_print_count_ptr_t)(uint32_t, const char *, uint32_t);
     49yamon_print_count_ptr_t yamon_print_count =
     50    (yamon_print_count_ptr_t) YAMON_SUBR_PRINT_COUNT;
     51
     52static void yamon_putchar(const wchar_t wch)
     53{
     54        const char ch = (char) wch;
     55
     56        (*yamon_print_count)(0, &ch, 1);
     57}
     58#endif
     59
    3460void putchar(const wchar_t ch)
    3561{
    3662        if (ascii_check(ch))
    37                 *((char *) MSIM_VIDEORAM_ADDRESS) = ch;
     63                _putchar(ch);
    3864        else
    39                 *((char *) MSIM_VIDEORAM_ADDRESS) = U_SPECIAL;
     65                _putchar(U_SPECIAL);
    4066}
     67
Note: See TracChangeset for help on using the changeset viewer.