Bluetooth: GATT: Make use of Z_STRUCT_SECTION_ITERABLE
This makes use of Z_STRUCT_SECTION_ITERABLE to define static service sections. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
a1e25b91ff
commit
8b9920fd77
3 changed files with 9 additions and 19 deletions
|
@ -443,8 +443,7 @@ ssize_t bt_gatt_attr_read_service(struct bt_conn *conn,
|
|||
*/
|
||||
#define BT_GATT_SERVICE_DEFINE(_name, ...) \
|
||||
const struct bt_gatt_attr attr_##_name[] = { __VA_ARGS__ }; \
|
||||
const struct bt_gatt_service_static _name __aligned(4) \
|
||||
__in_section(_bt_services, static, _name) = \
|
||||
const Z_STRUCT_SECTION_ITERABLE(bt_gatt_service_static, _name) =\
|
||||
BT_GATT_SERVICE(attr_##_name)
|
||||
|
||||
/** @def BT_GATT_SERVICE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue