23#if VSF_USE_PBUF == ENABLED
29#define __PLOOC_CLASS_USE_STRICT_TEMPLATE__
31#if defined(__VSF_PBUF_CLASS_IMPLEMENT)
32# define __PLOOC_CLASS_IMPLEMENT__
33# undef __VSF_PBUF_CLASS_IMPLEMENT
34#elif defined(__VSF_PBUF_CLASS_INHERIT__)
35# define __PLOOC_CLASS_INHERIT__
36# undef __VSF_PBUF_CLASS_INHERIT__
46#if defined(VSF_POOL_CFG_SUPPORT_USER_OBJECT) \
47 && VSF_POOL_CFG_SUPPORT_USER_OBJECT != ENABLED
48# error vsf_pbuf_t depends on a feature from vsf_pool_t which is not enabled. \
491) if vsf_pool_t is compiled with the source code, please set macro \
50VSF_POOL_CFG_SUPPORT_USER_OBJECT to ENABLED.\
512) if vsf_pool_t is includeded in some library, please add the source code of \
52vsf_pool_t into your project and follow the step 1).
57#define __BLOCK_FREE_TO(__N, __NUM) VSF_PBUF_FREE_TO_##__N = __N+1,
77typedef vsf_pbuf_t *req_pbuf_evt_handler(
void *target_ptr,
115end_def_class(vsf_pbuf_t)
129#if VSF_PBUF_CFG_INDIRECT_RW_SUPPORT == ENABLED
150 const i_pbuf_methods_t *methods_ptr;
168 vsf_pbuf_t * (*Free)(vsf_pbuf_t *);
196 void * (*Get)(vsf_pbuf_t *);
207#if VSF_PBUF_CFG_SUPPORT_REF_COUNTING == ENABLED
210 vsf_pbuf_t * (*Decrease)(vsf_pbuf_t *);
244#if VSF_PBUF_CFG_SUPPORT_REF_COUNTING == ENABLED
def_interface(i_adc_t) i_peripheral_t
#define NULL
Definition lvgl.h:26
unsigned int uint32_t
Definition lvgl.h:43
unsigned char uint8_t
Definition lvgl.h:40
uint32_t uintptr_t
Definition stdint.h:38
unsigned char uint_fast8_t
Definition stdint.h:23
unsigned int uint_fast32_t
Definition stdint.h:27
int int_fast32_t
Definition stdint.h:26
unsigned short uint_fast16_t
Definition stdint.h:25
req_pbuf_evt_handler * handler_fn
Definition vsf_pbuf.h:84
void * target_ptr
Definition vsf_pbuf.h:85
Definition vsf_pbuf.h:156
uint_fast8_t adapter_id
Definition vsf_pbuf.h:159
void * buffer_ptr
Definition vsf_pbuf.h:157
vsf_pbuf_capability_t
Definition vsf_pbuf.h:158
Definition vsf_list.h:876
fixed memory block used as stream buffer
Definition vsf_pbuf.h:90
uint32_t u24_block_size
Definition vsf_pbuf.h:92
uint32_t is_no_direct_access
Definition vsf_pbuf.h:95
uint32_t is_no_write
Definition vsf_pbuf.h:93
uint32_t is_no_read
Definition vsf_pbuf.h:94
uint32_t u5REFCount
Definition vsf_pbuf.h:96
uint32_t Capability
Definition vsf_pbuf.h:98
uint64_t offset
Definition vsf_memfs.h:49
uint32_t size
Definition vsf_memfs.h:50
const i_pbuf_t VSF_PBUF
Definition vsf_pbuf.c:47
int_fast32_t vsf_pbuf_capacity_get(vsf_pbuf_t *pobj)
Definition vsf_pbuf.c:313
dcl_interface(i_pbuf_t) def_interface(i_pbuf_t) vsf_pbuf_t *(*Init)(vsf_pbuf_t *
void(* Set)(vsf_pbuf_t *, int_fast32_t)
Definition vsf_pbuf.h:190
struct @779::@787 ItemInitEventHandler
void(* Reset)(vsf_pbuf_t *)
Definition vsf_pbuf.h:191
int_fast32_t int_fast32_t uint_fast16_t hwReserve
Definition vsf_pbuf.h:80
void vsf_pbuf_ref_increase(vsf_pbuf_t *pbuf)
Definition vsf_pbuf.c:337
vsf_pbuf_t * vsf_pbuf_init(vsf_pbuf_t *block_ptr, vsf_pbuf_cfg_t *pcfg)
Definition vsf_pbuf.c:136
void(* Increase)(vsf_pbuf_t *)
Definition vsf_pbuf.h:209
void(* Get)(uintptr_t ptarget, uintptr_t pitem, uint_fast32_t size)
Definition vsf_pbuf.h:170
int_fast32_t(* Read)(void *ptarget, void *pbuf_addr_ptr, void *pbuffer, int_fast32_t size, uint_fast32_t offset)
interface for reading target memory
Definition vsf_pbuf.h:131
end_def_interface(i_pbuf_t) extern const i_pbuf_t VSF_PBUF
vsf_pbuf_t *(* Free)(vsf_pbuf_t *)
Definition vsf_pbuf.h:168
vsf_pbuf_capability_t vsf_pbuf_capability_get(vsf_pbuf_t *obj_ptr)
Definition vsf_pbuf.c:329
void vsf_pbuf_pool_item_init_event_handler(uintptr_t ptarget, uintptr_t pitem, uint_fast32_t item_size)
Definition vsf_pbuf.c:380
vsf_pbuf_cfg_t *struct @779 PoolHelper
void(* Register)(const vsf_pbuf_adapter_t *padapter, uint_fast8_t size)
method to register an pbuf adapter array, size < 255
Definition vsf_pbuf.h:178
@ VSF_PBUF_NO_FREE
Definition vsf_pbuf.h:64
@ VSF_PBUF_FREE_TO_ANY
Definition vsf_pbuf.h:62
#define __BLOCK_FREE_TO(__N, __NUM)
Definition vsf_pbuf.h:57
void vsf_adapter_register(const vsf_pbuf_adapter_t *adaptors_ptr, uint_fast8_t u8_size)
Definition vsf_pbuf.c:113
int_fast32_t(* Write)(void *ptarget, void *pbuf_addr_ptr, const void *pbuffer, int_fast32_t size, uint_fast32_t offset)
interface for write target memory
Definition vsf_pbuf.h:138
void vsf_pbuf_size_set(vsf_pbuf_t *pobj, int_fast32_t size)
Definition vsf_pbuf.c:301
vsf_pbuf_t * vsf_pbuf_free(vsf_pbuf_t *pbuf)
Definition vsf_pbuf.c:347
void vsf_pbuf_size_reset(vsf_pbuf_t *pobj)
Definition vsf_pbuf.c:164
const vsf_pbuf_adapter_t * vsf_pbuf_adapter_get(uint_fast8_t id)
Definition vsf_pbuf.c:122
vsf_pbuf_t * block_ptr
User specified free.
Definition vsf_pbuf.h:127
int_fast32_t int_fast32_t nBestSize
Definition vsf_pbuf.h:79
void * vsf_pbuf_buffer_get(vsf_pbuf_t *pobj)
Definition vsf_pbuf.c:174
int_fast32_t vsf_pbuf_size_get(vsf_pbuf_t *pobj)
Definition vsf_pbuf.c:321
struct vsf_pbuf_adapter_t vsf_pbuf_adapter_t
Definition vsf_pbuf.h:152
int_fast32_t vsf_pbuf_buffer_read(vsf_pbuf_t *pobj, void *psrc, int_fast32_t size, uint_fast32_t offsite)
Definition vsf_pbuf.c:239
int_fast32_t nNoLessThan
Definition vsf_pbuf.h:78
int_fast32_t vsf_pbuf_buffer_write(vsf_pbuf_t *pobj, const void *psrc, int_fast32_t size, uint_fast32_t offsite)
Definition vsf_pbuf.c:187
int_fast32_t(* Capacity)(vsf_pbuf_t *)
Definition vsf_pbuf.h:192
def_class(vsf_stream_fifo_t, which(vsf_stream_tx_t TX;vsf_stream_rx_t RX;), private:vsf_slist_queue_t union { vsf_stream_fifo_cfg_t cfg;struct { vsf_stream_dat_rdy_evt_t tDataReadyEventHandling;vsf_stream_dat_drn_evt_t tDataDrainEventHandling;vsf_stream_status_t Status;#if !defined(VSF_PBUF_QUEUE_CFG_ATOM_ACCESS) vsf_protect_region_t *pregion;#endif };};) end_def_class(vsf_stream_fifo_t) extern vsf_err_t vsf_stream_fifo_init(vsf_stream_fifo_t *obj_ptr
dcl_class(vsf_pool_t) typedef void vsf_pool_item_init_evt_handler_t(uintptr_t target_ptr
uintptr_t uint_fast32_t item_size
Definition vsf_pool.h:477
#define VSF_MREPEAT(__COUNT, __MACRO, __PARAM)
Definition vsf_repeat_macro.h:51
which(union { inherit(vsf_msgt_container_t) vsf_tgui_control_t };vsf_tgui_v_container_t) implement_ex(struct
Definition vsf_tgui_control.h:562