WISP ERT (Client)  1.0.0
The WISP Extended Runtime (WISP side)
buf.c File Reference
#include <string.h>
#include <stdlib.h>
#include "buf.h"

Functions

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...
 

Function Documentation

◆ wio_alloc()

wio_status_t wio_alloc ( wio_buf_t self,
uint16_t  size,
void *  _ptr 
)

Allocate memory from WIO buffer in a circlular manner.

◆ wio_buf_alloc_init()

wio_status_t wio_buf_alloc_init ( wio_buf_t self,
uint16_t  size 
)

Initialize WIO buffer with dynamically allocated memory.

◆ wio_buf_init()

wio_status_t wio_buf_init ( wio_buf_t self,
uint8_t *  buffer,
uint16_t  size 
)

Initialize WIO buffer.

◆ wio_copy()

wio_status_t wio_copy ( wio_buf_t from,
wio_buf_t to,
uint16_t  size 
)

Copy data from one WIO buffer to another.

◆ wio_free()

wio_status_t wio_free ( wio_buf_t self,
uint16_t  size 
)

Free memory from WIO buffer in a circular manner.

◆ wio_read()

wio_status_t wio_read ( wio_buf_t self,
void *  data,
uint16_t  size 
)

Read data from WIO buffer.

◆ wio_write()

wio_status_t wio_write ( wio_buf_t self,
const void *  data,
uint16_t  size 
)

Write data to WIO buffer.