Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/drivers/ns16550/ns16550.c

    r39e1b9a r98a935e  
    112112}
    113113
    114 static void ns16550_write(outdev_t *dev, const char *s, size_t n)
     114static void ns16550_putuchar(outdev_t *dev, char32_t ch)
    115115{
    116116        ns16550_instance_t *instance = (ns16550_instance_t *) dev->data;
    117117
    118         if (instance->parea.mapped && !console_override)
    119                 return;
    120 
    121         const char *top = s + n;
    122         assert(top >= s);
    123 
    124         for (; s < top; s++) {
    125                 if (*s == '\n')
     118        if ((!instance->parea.mapped) || (console_override)) {
     119                if (ch == '\n')
    126120                        ns16550_sendb(instance, '\r');
    127121
    128                 ns16550_sendb(instance, (uint8_t) *s);
     122                if (ascii_check(ch))
     123                        ns16550_sendb(instance, (uint8_t) ch);
     124                else
     125                        ns16550_sendb(instance, U_SPECIAL);
    129126        }
    130127}
    131128
    132129static outdev_operations_t ns16550_ops = {
    133         .write = ns16550_write,
     130        .write = ns16550_putuchar,
    134131        .redraw = NULL
    135132};
Note: See TracChangeset for help on using the changeset viewer.