|
GPS Device
|
Public functions to interact with 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. | |
Public functions to interact with a circular buffer instance.
| 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.
Drains the circular buffer completely, copying each byte in order into output_buf_o and advancing the read position after each byte. Stops when the buffer is empty.
| [in,out] | cbuf_handle | Pointer to the circular buffer to read from. |
| [out] | output_buf_o | Pointer to the destination buffer. Must be large enough to hold all available bytes (up to size - 1). |
Reads all available data from the circular buffer into an output buffer.
Definition at line 22 of file cbuf.c.


| 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.
Copies up to input_len bytes from input_buf into the circular buffer, advancing the write position after each byte.
Writing stops early and returns ERR_BUFFER_FULL if the buffer becomes full before all input_len bytes have been written.
| [in,out] | cbuf_handle | Pointer to the circular buffer to write into. |
| [in] | input_buf | Pointer to the source data buffer. |
| [in] | input_len | Number of bytes to write. |
Definition at line 41 of file cbuf.c.


| 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.
The returned length ranges from 0 (empty) to size - 1 (full).
| [in] | cbuf_handle | Pointer to the circular buffer to query. |
| [out] | len_o | Pointer to a variable that will receive the byte count. |
Definition at line 61 of file cbuf.c.
