|
GPS Device
|
Circular buffer module public API. More...


Go to the source code of this file.
Classes | |
| struct | CBUF_HANDLE_ts |
| Handle representing a circular buffer instance. More... | |
Functions | |
| ERR_te | cbuf_read (CBUF_HANDLE_ts *cbuf_handle, uint8_t *output_buf_o) |
| Reads all available data from the circular buffer into an output buffer. | |
| ERR_te | cbuf_write (CBUF_HANDLE_ts *cbuf_handle, uint8_t *input_buf, uint32_t input_len) |
| Writes data from an input buffer into the circular buffer. | |
| ERR_te | cbuf_len (CBUF_HANDLE_ts const *cbuf_handle, uint8_t *len_o) |
| Returns the number of bytes currently stored in the circular buffer. | |
Circular buffer module public API.
This module provides a lightweight circular (ring) buffer implementation for byte-oriented data, including:
The buffer size must be a power of two, as the implementation uses bitwise masking for wrap-around.
Typical usage:
Definition in file cbuf.h.