mirror of
https://github.com/apache/nuttx.git
synced 2026-10-05 05:07:48 +00:00
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:
parent
f2ee1c5b35
commit
021a58d71a
13 changed files with 143 additions and 2 deletions
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue