18#ifndef __VSF_MEM_STREAM_H__
19#define __VSF_MEM_STREAM_H__
25#if VSF_USE_SIMPLE_STREAM == ENABLED
29#if defined(__VSF_MEM_STREAM_CLASS_IMPLEMENT)
30# define __VSF_CLASS_IMPLEMENT__
31# undef __VSF_MEM_STREAM_CLASS_IMPLEMENT
32#elif defined(__VSF_MEM_STREAM_CLASS_INHERIT__)
33# define __VSF_CLASS_INHERIT__
34# undef __VSF_MEM_STREAM_CLASS_INHERIT__
45#define __VSF_MEM_STREAM_INIT(__BUFFER, __SIZE) \
46 .op = &vsf_mem_stream_op, \
47 .buffer = (__BUFFER), \
49#define VSF_MEM_STREAM_INIT(__BUFFER, __SIZE) \
50 __VSF_MEM_STREAM_INIT((__BUFFER), (__SIZE))
52#define __vsf_mem_stream_type(__name) __name##_mem_stream_t
53#define vsf_mem_stream_type(__name) __vsf_mem_stream_type(__name)
55#define __declare_mem_stream(__name) \
56 vsf_dcl_class(vsf_mem_stream_type(__name))
58#define __define_mem_stream(__name, __size) \
59 vsf_class(vsf_mem_stream_type(__name)) { \
61 implement(vsf_mem_stream_t) \
62 uint8_t __buffer[__size]; \
66#define declare_mem_stream(__name) \
67 __declare_mem_stream(__name)
68#define dcl_mem_stream(__name) \
69 declare_mem_stream(__name)
70#define define_mem_stream(__name, __size) \
71 __define_mem_stream(__name, (__size))
72#define def_mem_stream(__name, __size) \
73 define_mem_stream(__name, (__size))
75#define __describe_mem_stream(__name, __size) \
76 declare_mem_stream(__name) \
77 define_mem_stream(__name, (__size)) \
78 vsf_mem_stream_type(__name) __name = { \
79 VSF_MEM_STREAM_INIT(__name.__buffer, (__size)) \
82#define describe_mem_stream(__name, __size) \
83 __describe_mem_stream(__name, (__size))
Definition vsf_mem_stream.h:88
Definition vsf_simple_stream.h:176
Definition vsf_simple_stream.h:254
unsigned short uint16_t
Definition lvgl.h:41
unsigned int uint32_t
Definition lvgl.h:43
#define vsf_class(__name)
Definition ooc_class.h:48
Definition vsf_utilities.h:51
const vsf_stream_op_t vsf_mem_stream_op
Definition vsf_mem_stream.c:67
uint32_t uint_fast16_t align
Definition vsf_pool.h:548