diff options
Diffstat (limited to 'hw/serial.c')
-rw-r--r-- | hw/serial.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/serial.c b/hw/serial.c index d3d45bf28c..4925612a85 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -761,6 +761,18 @@ static void serial_init_core(SerialState *s) serial_event, s); } +/* Get number of stored bytes in receive fifo. */ +unsigned serial_rx_fifo_count(SerialState *s) +{ + return s->recv_fifo.count; +} + +/* Get number of stored bytes in transmit fifo. */ +unsigned serial_tx_fifo_count(SerialState *s) +{ + return s->xmit_fifo.count; +} + /* Change the main reference oscillator frequency. */ void serial_set_frequency(SerialState *s, uint32_t frequency) { |