usb: Add instance parameter to descriptors definitions

This allows to place instances of the class one after another in the
linker section.

Fixes #12908

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2019-01-31 17:23:32 +02:00 committed by Anas Nashif
commit bf9c6d72e8
11 changed files with 14 additions and 13 deletions

View file

@ -50,8 +50,8 @@ extern "C" {
*/
#define USBD_DEVICE_DESCR_DEFINE(p) \
static __in_section(usb, descriptor_##p, 0) __used
#define USBD_CLASS_DESCR_DEFINE(p) \
static __in_section(usb, descriptor_##p, 1) __used
#define USBD_CLASS_DESCR_DEFINE(p, instance) \
static __in_section(usb, descriptor_##p.1, instance) __used
#define USBD_MISC_DESCR_DEFINE(p) \
static __in_section(usb, descriptor_##p, 2) __used
#define USBD_USER_DESCR_DEFINE(p) \