diff options
Diffstat (limited to 'include/hw/char')
-rw-r--r-- | include/hw/char/serial.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h index bca79f17b5..9ab81f6321 100644 --- a/include/hw/char/serial.h +++ b/include/hw/char/serial.h @@ -28,17 +28,10 @@ #include "hw/hw.h" #include "sysemu/sysemu.h" #include "exec/memory.h" +#include "qemu/fifo8.h" #define UART_FIFO_LENGTH 16 /* 16550A Fifo Length */ -typedef struct SerialFIFO { - uint8_t data[UART_FIFO_LENGTH]; - uint8_t count; - uint8_t itl; /* Interrupt Trigger Level */ - uint8_t tail; - uint8_t head; -} SerialFIFO; - struct SerialState { uint16_t divider; uint8_t rbr; /* receive register */ @@ -67,8 +60,10 @@ struct SerialState { /* Time when the last byte was successfully sent out of the tsr */ uint64_t last_xmit_ts; - SerialFIFO recv_fifo; - SerialFIFO xmit_fifo; + Fifo8 recv_fifo; + Fifo8 xmit_fifo; + /* Interrupt trigger level for recv_fifo */ + uint8_t recv_fifo_itl; struct QEMUTimer *fifo_timeout_timer; int timeout_ipending; /* timeout interrupt pending state */ |