Changes in kernel/genarch/src/drivers/s3c24xx/uart.c [e9bc927:28a5ebd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/s3c24xx/uart.c
re9bc927 r28a5ebd 49 49 #include <str.h> 50 50 51 static void s3c24xx_uart_sendb( s3c24xx_uart_t *uart, uint8_t byte)51 static void s3c24xx_uart_sendb(outdev_t *dev, uint8_t byte) 52 52 { 53 s3c24xx_uart_t *uart = 54 (s3c24xx_uart_t *) dev->data; 55 53 56 /* Wait for space becoming available in Tx FIFO. */ 54 57 while ((pio_read_32(&uart->io->ufstat) & S3C24XX_UFSTAT_TX_FULL) != 0) … … 58 61 } 59 62 60 static void s3c24xx_uart_ write(outdev_t *dev, const char *s, size_t n)63 static void s3c24xx_uart_putuchar(outdev_t *dev, char32_t ch) 61 64 { 62 s3c24xx_uart_t *uart = dev->data; 65 s3c24xx_uart_t *uart = 66 (s3c24xx_uart_t *) dev->data; 63 67 64 /* If the userspace owns the console, do not output anything. */ 65 if (uart->parea.mapped && !console_override) 66 return; 67 68 const char *top = s + n; 69 assert(top >= s); 70 71 for (; s < top; s++) { 72 if (*s == '\n') 73 s3c24xx_uart_sendb(uart, '\r'); 74 75 s3c24xx_uart_sendb(uart, (uint8_t) *s); 68 if ((!uart->parea.mapped) || (console_override)) { 69 if (!ascii_check(ch)) { 70 s3c24xx_uart_sendb(dev, U_SPECIAL); 71 } else { 72 if (ch == '\n') 73 s3c24xx_uart_sendb(dev, (uint8_t) '\r'); 74 s3c24xx_uart_sendb(dev, (uint8_t) ch); 75 } 76 76 } 77 77 } … … 94 94 95 95 static outdev_operations_t s3c24xx_uart_ops = { 96 .write = s3c24xx_uart_ write,96 .write = s3c24xx_uart_putuchar, 97 97 .redraw = NULL, 98 98 .scroll_up = NULL,
Note:
See TracChangeset
for help on using the changeset viewer.