19 if (
bfFull(bf))
return false;
21 bf->wp = ( bf->wp + 1 ) % bf->cap;
31 bf->rp = ( bf->rp + 1 ) % bf->cap;
static bool bfEmpty(ByteFifo *const bf)
Returns whether or not the byte-fifo is empty.
bool bfWrite(ByteFifo *const bf, uint8_t b)
Writes a byte to the byte-fifo.
static bool bfFull(ByteFifo *const bf)
Returns whether or not the byte-fifo is full.
Implements a simple byte-orientated Fifo with a maximum size of 255 bytes.
bool bfRead(ByteFifo *const bf, uint8_t *const b)
Reads a byte from the byte-fifo.