83 void (*out)(uint8_t byte);
uint8_t idle
Used to determine if the FIFO8 is already outputing bytes.
Fifo contents flushed to output function ASAP.
fifo8_error_t FIFO8_get(FIFO8 *target)
Takes a character from the buffer.
fifo8_error_t
Error codes returned by function calls.
uint16_t mask
Bit mask used for FIFO8 buffer memory wrapping.
The FIFO mode doesn't exist.
The FIFO buffer is empty.
uint16_t FIFO8_size(FIFO8 *target)
Return the size in bytes of the FIFO8 buffer.
fifo8_error_t FIFO8_put(FIFO8 *target, uint8_t byte)
Adds a character to the buffer.
uint8_t FIFO8_pop(FIFO8 *target)
Reset the fifo buffer and set its size to 0.
fifo8_error_t FIFO8_init(FIFO8 *target, fifo8_mode_t mode, uint8_t *buffer, uint16_t size, void(*output)(uint8_t byte))
Initializes the FIFO8 buffer.
Fifo contents flushed to output function when buffer is full.
fifo8_error_t FIFO8_flush(FIFO8 *target)
Flush all contents of the FIFO8 to the output function.
fifo8_mode_t mode
The FIFO8 mode of operation.
fifo8_mode_t
Operating modes for the buffer.
uint8_t * buffer
Pointer to the FIFO8 memory buffer.
Fifo content flushed to output function on call FIFO_flush()
uint16_t tail
The current read position in the FIFO8 memory buffer.
Data structure for FIFO8 perihperal interface.
uint16_t head
The current write position in the FIFO8 memory buffer.
The size of the FIFO buffer is not a power of 2.