alif/usbd: Implement proper USB serial number.
Using SE services to get the SoC unique id. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
2f85a19d7d
commit
31d18c5885
1 changed files with 3 additions and 2 deletions
|
|
@ -30,10 +30,11 @@
|
|||
|
||||
#include "shared/tinyusb/mp_usbd.h"
|
||||
#include "tusb.h"
|
||||
#include "se_services.h"
|
||||
|
||||
void mp_usbd_port_get_serial_number(char *serial_buf) {
|
||||
// TODO
|
||||
uint8_t id[8] = "ABCDEFGH";
|
||||
uint8_t id[5];
|
||||
se_services_get_unique_id(id);
|
||||
MP_STATIC_ASSERT(sizeof(id) * 2 <= MICROPY_HW_USB_DESC_STR_MAX);
|
||||
mp_usbd_hex_str(serial_buf, id, sizeof(id));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue