VSF Documented
|
#include <vsf_simple_stream.h>
Data Fields | |
void(* | init )(vsf_stream_t *stream) |
void(* | fini )(vsf_stream_t *stream) |
uint_fast32_t(* | write )(vsf_stream_t *stream, uint8_t *buf, uint_fast32_t size) |
uint_fast32_t(* | read )(vsf_stream_t *stream, uint8_t *buf, uint_fast32_t size) |
uint_fast32_t(* | get_buff_length )(vsf_stream_t *stream) |
uint_fast32_t(* | get_data_length )(vsf_stream_t *stream) |
uint_fast32_t(* | get_avail_length )(vsf_stream_t *stream) |
uint_fast32_t(* | get_wbuf )(vsf_stream_t *stream, uint8_t **ptr) |
uint_fast32_t(* | get_rbuf )(vsf_stream_t *stream, uint8_t **ptr) |
vsf steam operating functions
void(* vsf_stream_op_t::init) (vsf_stream_t *stream) |
initialization function, must be called before other APIs.
stream | stream instance, cannot be NULL. |
void(* vsf_stream_op_t::fini) (vsf_stream_t *stream) |
uint_fast32_t(* vsf_stream_op_t::write) (vsf_stream_t *stream, uint8_t *buf, uint_fast32_t size) |
write function, must be called after init.
stream | stream instance, cannot be NULL. |
buf | buffer pointer, point to a buffer or NULL |
size | write size(bytes), if buffer is NULL, then increase stream size. |
uint_fast32_t(* vsf_stream_op_t::read) (vsf_stream_t *stream, uint8_t *buf, uint_fast32_t size) |
read function, must be called after init.
stream | stream instance, cannot be NULL. |
buf | buffer pointer, point to a buffer or NULL |
size | read size(bytes), if buffer is NULL, then decrease stream size |
uint_fast32_t(* vsf_stream_op_t::get_buff_length) (vsf_stream_t *stream) |
uint_fast32_t(* vsf_stream_op_t::get_data_length) (vsf_stream_t *stream) |
uint_fast32_t(* vsf_stream_op_t::get_avail_length) (vsf_stream_t *stream) |
uint_fast32_t(* vsf_stream_op_t::get_wbuf) (vsf_stream_t *stream, uint8_t **ptr) |
uint_fast32_t(* vsf_stream_op_t::get_rbuf) (vsf_stream_t *stream, uint8_t **ptr) |