toolchain: add STRUCT_SECTION_START|END helpers
Even though they are just wrappers around TYPE_SECTION_START|END, it allows using the STRUCT_SECTION* API namespace everywhere when working with struct-based iterable sections. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
13f87494bb
commit
7525a551cf
1 changed files with 16 additions and 0 deletions
|
|
@ -321,6 +321,14 @@
|
|||
(uintptr_t)TYPE_SECTION_START(secname)) / sizeof(type); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* @brief iterable section start symbol for a struct type
|
||||
*
|
||||
* @param[in] struct_type data type of section
|
||||
*/
|
||||
#define STRUCT_SECTION_START(struct_type) \
|
||||
TYPE_SECTION_START(struct_type)
|
||||
|
||||
/**
|
||||
* @brief iterable section extern for start symbol for a struct
|
||||
*
|
||||
|
|
@ -331,6 +339,14 @@
|
|||
#define STRUCT_SECTION_START_EXTERN(struct_type) \
|
||||
TYPE_SECTION_START_EXTERN(struct struct_type, struct_type)
|
||||
|
||||
/**
|
||||
* @brief iterable section end symbol for a struct type
|
||||
*
|
||||
* @param[in] struct_type data type of section
|
||||
*/
|
||||
#define STRUCT_SECTION_END(struct_type) \
|
||||
TYPE_SECTION_END(struct_type)
|
||||
|
||||
/**
|
||||
* @brief iterable section extern for end symbol for a struct
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue