Changes in kernel/genarch/src/drivers/ns16550/ns16550.c [39e1b9a:98a935e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/ns16550/ns16550.c
r39e1b9a r98a935e 112 112 } 113 113 114 static void ns16550_ write(outdev_t *dev, const char *s, size_t n)114 static void ns16550_putuchar(outdev_t *dev, char32_t ch) 115 115 { 116 116 ns16550_instance_t *instance = (ns16550_instance_t *) dev->data; 117 117 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') 126 120 ns16550_sendb(instance, '\r'); 127 121 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); 129 126 } 130 127 } 131 128 132 129 static outdev_operations_t ns16550_ops = { 133 .write = ns16550_ write,130 .write = ns16550_putuchar, 134 131 .redraw = NULL 135 132 };
Note:
See TracChangeset
for help on using the changeset viewer.