File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
cmake/linker_script/common Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ endif()
127
127
128
128
if (CONFIG_VIDEO )
129
129
zephyr_iterable_section (NAME video_device GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} )
130
+ zephyr_iterable_section (NAME video_interface GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} )
130
131
endif ()
131
132
132
133
if (CONFIG_LOG )
Original file line number Diff line number Diff line change 1
1
#include <zephyr/linker/iterable_sections.h>
2
2
3
3
ITERABLE_SECTION_RAM(video_device, Z_LINK_ITERABLE_SUBALIGN)
4
+ ITERABLE_SECTION_RAM(video_interface, Z_LINK_ITERABLE_SUBALIGN)
Original file line number Diff line number Diff line change @@ -16,13 +16,22 @@ struct video_device {
16
16
sys_dlist_t ctrls ;
17
17
};
18
18
19
+ struct video_interface {
20
+ const struct device * dev ;
21
+ };
22
+
19
23
#define VIDEO_DEVICE_DEFINE (name , device , source ) \
20
24
static STRUCT_SECTION_ITERABLE(video_device, name) = { \
21
25
.dev = device, \
22
26
.src_dev = source, \
23
27
.ctrls = SYS_DLIST_STATIC_INIT(&name.ctrls), \
24
28
}
25
29
30
+ #define VIDEO_INTERFACE_DEFINE (name , device ) \
31
+ static STRUCT_SECTION_ITERABLE(video_interface, name) = { \
32
+ .dev = device, \
33
+ }
34
+
26
35
struct video_device * video_find_vdev (const struct device * dev );
27
36
28
37
#endif /* ZEPHYR_INCLUDE_DRIVERS_VIDEO_VIDEO_DEVICE_H_ */
You can’t perform that action at this time.
0 commit comments