61#ifndef FRAM_BUFFER_START
63#define FRAM_BUFFER_START 0
66#ifndef FRAM_BUFFER_END
68#define FRAM_BUFFER_END 1769
71#if FRAM_BUFFER_START > FRAM_BUFFER_END
72#error "Buffer end address must be greater than buffer start address"
Storage interface for onboard FRAM chips.
fram_status fifo_get(uint8_t *data, uint8_t *len)
Reads a measurement from the queue.
int fifo_size(void)
Gets the total number of bytes in the buffer.
uint16_t fifo_buffer_len(void)
Get the current number of measurements stored in the buffer.
fram_status fifo_buffer_clear(void)
Clears the buffer.
fram_status fifo_put(const uint8_t *data, uint8_t num_bytes)
Puts a measurement into the circular buffer.
fram_status fifo_drop(void)
Drops the next measurement in the buffer.
fram_status fifo_save_buffer_state(void)
Saves the buffer state (read address, write address, and buffer length) to FRAM.
fram_status fifo_peek(size_t idx, uint8_t *data, uint8_t *len)
Peeks at the next measurement in the buffer without removing it.
fram_status fifo_init(void)
Initializes the buffer.
fram_status fifo_load_buffer_state(void)
Loads the buffer state (read address, write address, and buffer length) from FRAM.