include: usb: add alignment attribute to macro USBD_CFG_DATA_DEFINE
It could be observed on native_posix_64 platform that
without alignment attribute the usb_cfg_data structures
are placed with a gap or padding in specified RAM section.
This breaks the possibility to iterate over the structures.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
diff --git a/include/usb/usb_device.h b/include/usb/usb_device.h
index 8884c8a..2ee06fc 100644
--- a/include/usb/usb_device.h
+++ b/include/usb/usb_device.h
@@ -68,7 +68,7 @@
* inside usb data section in the RAM.
*/
#define USBD_CFG_DATA_DEFINE(p, name) \
- static __in_section(usb, data_##p, name) __used
+ static __in_section(usb, data_##p, name) __used __aligned(4)
/*************************************************************************
* USB configuration