Go to the source code of this file.
|
wio_status_t | wio_buf_init (wio_buf_t *self, uint8_t *buffer, uint16_t size) |
| Initialize WIO buffer. More...
|
|
wio_status_t | wio_buf_alloc_init (wio_buf_t *self, uint16_t size) |
| Initialize WIO buffer with dynamically allocated memory. More...
|
|
wio_status_t | wio_read (wio_buf_t *self, void *data, uint16_t size) |
| Read data from WIO buffer. More...
|
|
wio_status_t | wio_write (wio_buf_t *self, const void *data, uint16_t size) |
| Write data to WIO buffer. More...
|
|
wio_status_t | wio_copy (wio_buf_t *from, wio_buf_t *to, uint16_t size) |
| Copy data from one WIO buffer to another. More...
|
|
wio_status_t | wio_alloc (wio_buf_t *self, uint16_t size, void *_ptr) |
| Allocate memory from WIO buffer in a circlular manner. More...
|
|
wio_status_t | wio_free (wio_buf_t *self, uint16_t size) |
| Free memory from WIO buffer in a circular manner. More...
|
|
◆ wio_alloc()
Allocate memory from WIO buffer in a circlular manner.
- Parameters
-
self | WIO buffer instance. |
size | Size of the memory to allocate. |
_ptr | Pointer to memory for holding pointer to allocated memory. |
- Returns
- WIO_ERR_NO_MEMORY if no memory available for allocation, otherwise WIO_OK.
◆ wio_buf_alloc_init()
Initialize WIO buffer with dynamically allocated memory.
- Parameters
-
self | WIO buffer instance. |
size | Size of underlying buffer. |
- Returns
- WIO_ERR_NO_MEMORY if allocation failed, otherwise WIO_OK.
◆ wio_buf_init()
Initialize WIO buffer.
- Parameters
-
self | WIO buffer instance. |
buffer | Underlying buffer. |
size | Size of underlying buffer. |
- Returns
- WIO_OK.
◆ wio_copy()
Copy data from one WIO buffer to another.
- Parameters
-
from | Source WIO buffer. |
to | Target WIO buffer. |
size | Size of data to copy. |
- Returns
- WIO_ERR_OUT_OF_RANGE if out-of-range read or write happens, otherwise WIO_OK.
◆ wio_free()
Free memory from WIO buffer in a circular manner.
- Parameters
-
self | WIO buffer instance. |
size | Size of the memory to free. |
- Returns
- WIO_OK.
◆ wio_read()
Read data from WIO buffer.
- Parameters
-
self | WIO buffer instance. |
data | Pointer to memory for holding read data. |
size | Size of data to read. |
- Returns
- WIO_ERR_OUT_OF_RANGE if read beyond buffer range, otherwise WIO_OK.
◆ wio_write()
Write data to WIO buffer.
- Parameters
-
self | WIO buffer instance. |
data | Pointer to write data. |
size | Size of data to write. |
- Returns
- WIO_ERR_OUT_OF_RANGE if write beyond buffer range, otherwise WIO_OK.