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> |
||
|---|---|---|
| .. | ||
| device | ||
| device_next | ||
| host | ||
| usb_c | ||
| CMakeLists.txt | ||