usb_cdcacm: fix U_ID decoding
This commit is contained in:
parent
e9f7e574ba
commit
3cec6dfb79
|
@ -444,7 +444,7 @@ static void usb_cdcacm_set_config(usbd_device *usbd_dev, uint16_t wValue)
|
|||
|
||||
void usb_cdcacm_setup(void)
|
||||
{
|
||||
snprintf(usb_serial, LENGTH(usb_serial), "%08x%08x%08x", DESIG_UNIQUE_ID0, DESIG_UNIQUE_ID1, DESIG_UNIQUE_ID2); // set actual device ID as serial
|
||||
snprintf(usb_serial, LENGTH(usb_serial), "%08x%08x%04x%04x", DESIG_UNIQUE_ID2, DESIG_UNIQUE_ID1, DESIG_UNIQUE_ID0 & 0xffff, DESIG_UNIQUE_ID0 >> 16); // set actual device ID as serial
|
||||
|
||||
// initialize USB
|
||||
rcc_periph_reset_pulse(RST_USB); // reset USB peripheral
|
||||
|
|
Loading…
Reference in New Issue