usbdev: Add board unique serial string support

iSerialNumber field in the device descriptor can be used to determining the
board when multiple boards connected to the same host. So add feature to change
serial string by board unique ID dynamically.
To use this feature, user must be implement the board_usbdev_serialstr() logic.

refs #13909
This commit is contained in:
SPRESENSE
2022-01-18 10:36:37 +09:00
committed by Alin Jerpelea
parent f2ee1c5b35
commit 021a58d71a
13 changed files with 143 additions and 2 deletions
+2
View File
@@ -118,7 +118,9 @@ static const struct usbdevclass_driverops_s g_driverops =
const char g_compvendorstr[] = CONFIG_COMPOSITE_VENDORSTR;
const char g_compproductstr[] = CONFIG_COMPOSITE_PRODUCTSTR;
#ifndef CONFIG_COMPOSITE_BOARD_SERIALSTR
const char g_compserialstr[] = CONFIG_COMPOSITE_SERIALSTR;
#endif
/****************************************************************************
* Private Functions