18#ifndef __VSF_DISTBUS_STREAM_H__
19#define __VSF_DISTBUS_STREAM_H__
25#if VSF_USE_SIMPLE_STREAM == ENABLED && VSF_USE_DISTBUS == ENABLED
29#if defined(__VSF_DISTBUS_STREAM_CLASS_IMPLEMENT)
30# define __VSF_CLASS_IMPLEMENT__
31#elif defined(__VSF_DISTBUS_STREAM_CLASS_INHERIT__)
32# define __VSF_CLASS_INHERIT__
43#define __VSF_DISTBUS_STREAM_INIT(__NAME, __DISTBUS, __MTU, __IS_TX, __BUF_SIZE, __HANDLER) \
44 .op = &vsf_distbus_stream_op, \
45 .buf_size = (__BUF_SIZE), \
47 .distbus = (__DISTBUS), \
49 .addr_range = VSF_DISTBUS_STREAM_ADDR_RANGE, \
50 .handler = (__HANDLER), \
51 .info = (const vsf_distbus_service_info_t *) \
52 &(__NAME).use_as__vsf_distbus_service_info_t,
53#define VSF_DISTBUS_STREAM_INIT(__NAME, __DISTBUS, __MTU, __IS_TX, __BUF_SIZE, __HANDLER)\
54 __VSF_DISTBUS_STREAM_INIT(__NAME, (__DISTBUS), (__MTU), (__IS_TX), (__BUF_SIZE), (__HANDLER))
56#define __describe_distbus_stream(__name, __distbus, __mtu, __is_tx, __buf_size, __handler) \
57 vsf_distbus_stream_t __name = { \
58 VSF_DISTBUS_STREAM_INIT(__name, (__distbus), (__mtu), (__is_tx), (__buf_size), (__handler))\
61#define describe_distbus_stream_tx(__name, __distbus, __mtu, __buf_size, __handler)\
62 __describe_distbus_stream(__name, (__distbus), (__mtu), true, (__buf_size), (__handler))
63#define describe_distbus_stream_rx(__name, __distbus, __mtu, __handler) \
64 __describe_distbus_stream(__name, (__distbus), (__mtu), false, 0, (__handler))
107#if defined(__VSF_DISTBUS_STREAM_CLASS_IMPLEMENT) \
108 || defined(__VSF_DISTBUS_STREAM_CLASS_INHERIT__)
117#undef __VSF_DISTBUS_STREAM_CLASS_IMPLEMENT
118#undef __VSF_DISTBUS_STREAM_CLASS_INHERIT__
Definition vsf_distbus.h:68
Definition vsf_distbus.h:86
Definition vsf_distbus_stream.h:76
Definition vsf_distbus.h:119
Definition vsf_simple_stream.h:176
Definition vsf_simple_stream.h:254
unsigned int uint32_t
Definition lvgl.h:43
#define vsf_class(__name)
Definition ooc_class.h:48
Definition vsf_distbus.h:78
Definition vsf_list.h:896
bool __vsf_distbus_stream_msghandler(vsf_distbus_t *bus, vsf_distbus_service_t *service, vsf_distbus_msg_t *msg)
Definition vsf_distbus_stream.c:66
const vsf_stream_op_t vsf_distbus_stream_op
Definition vsf_distbus_stream.c:52
@ VSF_DISTBUS_STREAM_CMD_BUF_SIZE
Definition vsf_distbus_stream.h:70
@ VSF_DISTBUS_STREAM_CMD_SIZE
Definition vsf_distbus_stream.h:72
@ VSF_DISTBUS_STREAM_ADDR_RANGE
Definition vsf_distbus_stream.h:73
@ VSF_DISTBUS_STREAM_CMD_DATA
Definition vsf_distbus_stream.h:71
void vsf_distbus_stream_register_service(vsf_distbus_stream_t *distbus_stream)
Definition vsf_distbus_stream.c:282