1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/usb: Use luid_base for stable USB serials

This is useful when having multiple instances of the same board
connected via USB CDC ACM and telling the TTYs apart.
This commit is contained in:
Marian Buschsieweke 2024-10-28 14:50:42 +01:00
parent b376bec667
commit 6b80a1a61e
No known key found for this signature in database
GPG Key ID: 758BD52517F79C41

View File

@ -422,7 +422,7 @@ static void *_usbus_thread(void *args)
"USB serial byte length must be at most 63 due to protocol "
"limitations");
uint8_t luid_buf[CONFIG_USB_SERIAL_BYTE_LENGTH];
luid_get(luid_buf, sizeof(luid_buf));
luid_base(luid_buf, sizeof(luid_buf));
fmt_bytes_hex(usbus->serial_str, luid_buf, sizeof(luid_buf));
usbus_add_string_descriptor(usbus, &usbus->serial, usbus->serial_str);
#endif