usb: device_next: use specific macros for string descriptors

Add and use specific macros for manufacturer, product, and
serial number string descriptors.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2023-05-19 12:44:07 +02:00 committed by Anas Nashif
commit 9a4ed741d6
6 changed files with 26 additions and 15 deletions

View file

@ -15,9 +15,10 @@ USBD_CONFIGURATION_DEFINE(config_1,
200);
USBD_DESC_LANG_DEFINE(sample_lang);
USBD_DESC_STRING_DEFINE(sample_mfr, "ZEPHYR", 1);
USBD_DESC_STRING_DEFINE(sample_product, "Zephyr USBD BT HCI", 2);
USBD_DESC_STRING_DEFINE(sample_sn, "0123456789ABCDEF", 3);
USBD_DESC_MANUFACTURER_DEFINE(sample_mfr, "ZEPHYR");
USBD_DESC_PRODUCT_DEFINE(sample_product, "Zephyr USBD BT HCI");
USBD_DESC_SERIAL_NUMBER_DEFINE(sample_sn, "0123456789ABCDEF");
USBD_DEVICE_DEFINE(sample_usbd,
DEVICE_DT_GET(DT_NODELABEL(zephyr_udc0)),