Changeset 6b03a3c in mainline for kernel/genarch/src/drivers/s3c24xx/uart.c
- Timestamp:
- 2025-04-18T13:45:46Z (4 days ago)
- Children:
- 9fc15f9
- Parents:
- 94abc30c (diff), 25fdb2d (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. - git-author:
- Wayne Thornton <wmthornton-dev@…> (2025-04-18 13:45:46)
- git-committer:
- GitHub <noreply@…> (2025-04-18 13:45:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/drivers/s3c24xx/uart.c
r94abc30c r6b03a3c 49 49 #include <str.h> 50 50 51 static void s3c24xx_uart_sendb( outdev_t *dev, uint8_t byte)51 static void s3c24xx_uart_sendb(s3c24xx_uart_t *uart, uint8_t byte) 52 52 { 53 s3c24xx_uart_t *uart =54 (s3c24xx_uart_t *) dev->data;55 56 53 /* Wait for space becoming available in Tx FIFO. */ 57 54 while ((pio_read_32(&uart->io->ufstat) & S3C24XX_UFSTAT_TX_FULL) != 0) … … 61 58 } 62 59 63 static void s3c24xx_uart_ putuchar(outdev_t *dev, char32_t ch)60 static void s3c24xx_uart_write(outdev_t *dev, const char *s, size_t n) 64 61 { 65 s3c24xx_uart_t *uart = 66 (s3c24xx_uart_t *) dev->data; 62 s3c24xx_uart_t *uart = dev->data; 67 63 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 } 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); 76 76 } 77 77 } … … 94 94 95 95 static outdev_operations_t s3c24xx_uart_ops = { 96 .write = s3c24xx_uart_ putuchar,96 .write = s3c24xx_uart_write, 97 97 .redraw = NULL, 98 98 .scroll_up = NULL,
Note:
See TracChangeset
for help on using the changeset viewer.