Changeset 3d9d948 in mainline for uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
- Timestamp:
- 2010-07-27T20:13:05Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1720cf9
- Parents:
- a9b5b5f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c
ra9b5b5f r3d9d948 57 57 #define S3C24XX_UTRSTAT_TX_EMPTY 0x4 58 58 #define S3C24XX_UTRSTAT_RDATA 0x1 59 60 /* Bits in UFSTAT register */ 61 #define S3C24XX_UFSTAT_TX_FULL 0x4000 62 #define S3C24XX_UFSTAT_RX_FULL 0x0040 63 #define S3C24XX_UFSTAT_RX_COUNT 0x002f 59 64 60 65 static irq_cmd_t uart_irq_cmds[] = { … … 155 160 (void) iid; (void) call; 156 161 157 if ((pio_read_32(&uart->io->utrstat) & S3C24XX_UTRSTAT_RDATA) != 0) {162 while ((pio_read_32(&uart->io->ufstat) & S3C24XX_UFSTAT_RX_COUNT) != 0) { 158 163 uint32_t data = pio_read_32(&uart->io->urxh) & 0xff; 164 pio_read_32(&uart->io->uerstat); 159 165 160 166 if (uart->client_phone != -1) { … … 206 212 static void s3c24xx_uart_sendb(s3c24xx_uart_t *uart, uint8_t byte) 207 213 { 208 /* Wait for transmitter to be empty. */209 while ((pio_read_32(&uart->io->u trstat) & S3C24XX_UTRSTAT_TX_EMPTY) == 0)214 /* Wait for space becoming available in Tx FIFO. */ 215 while ((pio_read_32(&uart->io->ufstat) & S3C24XX_UFSTAT_TX_FULL) != 0) 210 216 ; 211 217
Note:
See TracChangeset
for help on using the changeset viewer.