zephyr/samples/subsys/usb/common
Tomasz Moń 75109707e3 usb: device_next: Do not add serial number without HWINFO
For many devices iSerialNumber is not required. The only device class
currently supported in Zephyr that requires iSerialNumber is MSC. If the
serial number is not available then iSerialNumber must be 0. Failure to
read the string descriptor for non-zero iSerialNumber fails USB Command
Verifier Chapter 9 tests.

When USBD_DESC_SERIAL_NUMBER_DEFINE() was used without CONFIG_HWINFO
then it did lead to runtime failure when requesting the string (thus
failing certification).

Fail USBD_DESC_SERIAL_NUMBER_DEFINE() at build-time if CONFIG_HWINFO is
not set to prevent the surprise at runtime. Only define serial number
descriptors if CONFIG_HWINFO is enabled.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-03-26 16:18:56 +01:00
..
common.cmake
Kconfig.sample_usbd samples: usb: add a sample USB 2.0 Extension Descriptor 2024-05-17 16:25:02 +01:00
sample_usbd_init.c usb: device_next: Do not add serial number without HWINFO 2025-03-26 16:18:56 +01:00
sample_usbd.h samples: usb: add samples function to setup USB device only 2024-11-19 09:53:29 -05:00