File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -841,6 +841,10 @@ static inline bool z_impl_device_is_ready(const struct device *dev)
841
841
#define Z_DEVICE_EXTRA_HANDLES (...) \
842
842
FOR_EACH_NONEMPTY_TERM(IDENTITY, (,), __VA_ARGS__)
843
843
844
+ /** @brief Linker section were device handles are placed. */
845
+ #define Z_DEVICE_HANDLES_SECTION \
846
+ __attribute__((__section__(".__device_handles_pass1")))
847
+
844
848
/**
845
849
* @brief Define device handles.
846
850
*
@@ -882,7 +886,7 @@ static inline bool z_impl_device_is_ready(const struct device *dev)
882
886
extern Z_DEVICE_HANDLES_CONST device_handle_t \
883
887
Z_DEVICE_HANDLE_NAME(node_id, dev_id)[]; \
884
888
Z_DEVICE_HANDLES_CONST Z_DECL_ALIGN(device_handle_t) \
885
- __attribute__((__section__(".__device_handles_pass1"))) __weak \
889
+ Z_DEVICE_HANDLES_SECTION __weak \
886
890
Z_DEVICE_HANDLE_NAME(node_id, dev_id)[] = { \
887
891
COND_CODE_1(DT_NODE_EXISTS(node_id), ( \
888
892
DT_DEP_ORD(node_id), \
You can’t perform that action at this time.
0 commit comments