/* Returns the number of bytes available in the FIFO.  */
uint32_t dev_ringbuf_avail(dev_ringbuf_t *fifo)
/* Returns the number of bytes available in the FIFO.  */
uint32_t dev_ringbuf_avail(dev_ringbuf_t *fifo)
{
    return ringbuffer_size(fifo) - dev_ringbuf_len(fifo);
}