Description
This function will try to write a byte to the FIFO. Data written to the FIFO will be added to the end of any data already in the FIFO.The order in which data is written to and read from a FIFO is strictly preserved and is refered to as first in first out order.
Definition
byte fifo_write(FIFO *fifo, char ch)Library
LIB/fifo_lib.basUsage
char ch byte res res = fifo_write(&xfifo, ch) if res == 0 then // ch was successfully written to the FIFO do_something_because_ch_written_to_fifo() else // the FIFO is full and ch was not written to it do_something_because_fifo_full() endifOn entry:fifo is a pointer to a FIFO or an array initalised for use as a FIFO.On exit:
ch is the 8 bit value to add to fifoThis function will return fifo_ok if ch is successfully written to fifo otherwise it will return fifo_error.