80#if VSF_USE_FIFO == ENABLED
86#if defined(__VSF_FIFO_CLASS_IMPLEMENT)
87# define __VSF_CLASS_IMPLEMENT__
88# undef __VSF_FIFO_CLASS_IMPLEMENT
89#elif defined(__VSF_FIFO_CLASS_INHERIT__)
90# define __VSF_CLASS_INHERIT__
91# undef __VSF_FIFO_CLASS_INHERIT__
101#define __vsf_fifo(__name) __name##_fifo_t
103#define __declare_vsf_fifo(__name) \
104 vsf_dcl_class(vsf_fifo(__name))
106#define __define_vsf_fifo(__name, __item_type, __depth) \
107 vsf_class(vsf_fifo(__name)) { \
109 implement(vsf_fifo_base_t) \
110 __item_type __mem[__depth]; \
116#define vsf_fifo(__name) __vsf_fifo(__name)
118#define declare_vsf_fifo(__name) \
119 __declare_vsf_fifo(__name)
121#define dcl_vsf_fifo(__name) \
122 declare_vsf_fifo(__name)
124#define define_vsf_fifo(__name, \
127 __define_vsf_fifo(__name, __item_type, (__depth))
129#define def_vsf_fifo( __name, \
132 define_vsf_fifo(__name, __item_type, (__depth))
134#define end_def_fifo(__name)
135#define end_define_fifo(__name)
138#define VSF_FIFO_INIT(__FIFO) \
139 vsf_fifo_init((vsf_fifo_t *)(__FIFO), dimof((__FIFO)->__mem));
141#define VSF_FIFO_GET_HEAD(__FIFO) \
142 vsf_fifo_get_head((vsf_fifo_t *)(__FIFO), sizeof((__FIFO)->__mem[0]))
144#define VSF_FIFO_GET_TAIL(__FIFO) \
145 vsf_fifo_get_tail((vsf_fifo_t *)(__FIFO), sizeof((__FIFO)->__mem[0]))
147#define VSF_FIFO_PUSH( __FIFO, \
149 vsf_fifo_push((vsf_fifo_t *)(__FIFO), (uintptr_t)(__ITEM), sizeof((__FIFO)->__mem[0]))
151#define VSF_FIFO_POP( __FIFO, \
153 vsf_fifo_pop((vsf_fifo_t *)(__FIFO), (uintptr_t)(__ITEM), sizeof((__FIFO)->__mem[0]))
155#define VSF_FIFO_GET_NUMBER(__FIFO) \
156 vsf_fifo_get_number((vsf_fifo_t *)(__FIFO))
160#ifndef vsf_fifo_index_t
161# define vsf_fifo_index_t uint8_t
163#ifndef vsf_fifo_fast_index_t
164# define vsf_fifo_fast_index_t uint_fast8_t
166#ifndef vsf_fifo_item_size_t
167# define vsf_fifo_item_size_t uint16_t
169#ifndef vsf_fifo_fast_item_size_t
170# define vsf_fifo_fast_item_size_t uint_fast16_t
#define VSF_CAL_SECTION(__SEC)
Definition __compiler.h:181
Definition vsf_fifo.h:175
Definition vsf_fifo.h:186
unsigned int uint32_t
Definition lvgl.h:43
#define vsf_class(__name)
Definition ooc_class.h:48
uint32_t uintptr_t
Definition stdint.h:38
#define vsf_fifo_index_t
Definition vsf_fifo.h:161
#define vsf_fifo_fast_index_t
Definition vsf_fifo.h:164
uintptr_t vsf_fifo_get_tail(vsf_fifo_t *fifo, vsf_fifo_fast_item_size_t item_size)
Definition vsf_fifo.c:139
vsf_fifo_index_t vsf_fifo_get_number(vsf_fifo_t *fifo)
Definition vsf_fifo.c:154
bool vsf_fifo_pop(vsf_fifo_t *fifo, uintptr_t item, vsf_fifo_fast_item_size_t item_size)
Definition vsf_fifo.c:96
bool vsf_fifo_push(vsf_fifo_t *fifo, uintptr_t item, vsf_fifo_fast_item_size_t item_size)
Definition vsf_fifo.c:68
#define vsf_fifo_fast_item_size_t
Definition vsf_fifo.h:170
uintptr_t vsf_fifo_get_head(vsf_fifo_t *fifo, vsf_fifo_fast_item_size_t item_size)
Definition vsf_fifo.c:124
void vsf_fifo_init(vsf_fifo_t *fifo, vsf_fifo_fast_index_t fifo_depth)
Definition vsf_fifo.c:61
__bfs_node_fifo_t fifo
Definition vsf_msg_tree.h:247
uintptr_t uint_fast32_t item_size
Definition vsf_pool.h:477
uint16_t tail
Definition vsf_queue.h:632
uint16_t head
Definition vsf_queue.h:632