Implementation of a Ring buffer (Circular buffer) for the Adafruit I2C FRAM breakout.
The implementation uses the Adafruit I2C FRAM Driver fo the I2C communication with the FRAM.
To work with the ring buffer, it has to be formatted with a page size. The page size defines the number of bytes one page has in the buffer.
Initializes the the buffer and the driver to the FRAM
Formats the ring buffer. After formating, the buffer is empty and the page size is set.
Writes one page to the buffer. If the successful, true will be returned, otherwise false.
Reads one page from the buffer. If the successful, true will be returned, otherwise false.
Gets the page size.
Returns the address in the memory next used for page writing.
Returns the address in the memory next used for page reading.
Returns true, if the ring buffer is initialized (formatted).
Returns true, if the ring buffer is full. A call to write will also return false.
Returns true, if there is some data in the ring buffer. A call to resd will be successful.
Dumps the complete memory.