5 #include <freertos/FreeRTOS.h> 6 #include <freertos/ringbuf.h> 28 size_t read(
void *data,
size_t len, TickType_t ticks_to_wait = 0);
40 size_t write(
const void *data,
size_t len);
82 static std::unique_ptr<RingBuffer>
create(
size_t len);
bool discard_bytes_(size_t discard_bytes)
Discards data from the ring buffer.
size_t free() const
Returns the number of free bytes in the ring buffer.
size_t write_without_replacement(const void *data, size_t len, TickType_t ticks_to_wait=0)
Writes to the ring buffer without overwriting oldest data.
BaseType_t reset()
Resets the ring buffer, discarding all stored data.
size_t read(void *data, size_t len, TickType_t ticks_to_wait=0)
Reads from the ring buffer, waiting up to a specified number of ticks if necessary.
size_t available() const
Returns the number of available bytes in the ring buffer.
StaticRingbuffer_t structure_
Implementation of SPI Controller mode.
size_t write(const void *data, size_t len)
Writes to the ring buffer, overwriting oldest data if necessary.
static std::unique_ptr< RingBuffer > create(size_t len)