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
+17
View File
@@ -429,6 +429,23 @@ int board_composite_initialize(int port);
FAR void *board_composite_connect(int port, int configid);
#endif
/****************************************************************************
* Name: board_usbdev_serialstr
*
* Description:
* Use board unique serial number string to iSerialNumber field in the
* device descriptor. This is for determining the board when multiple
* boards on the same host.
*
* Returned Value:
* The board unique serial number string.
*
****************************************************************************/
#if defined(CONFIG_BOARD_USBDEV_SERIALSTR)
FAR const char *board_usbdev_serialstr(void);
#endif
/****************************************************************************
* Name: board_graphics_setup
*