serialno: Improved the naming of the serial number reading function
This commit is contained in:
parent
886c790b25
commit
400ee0c76c
|
@ -608,7 +608,6 @@ static bool cmd_traceswo(target *t, int argc, const char **argv)
|
||||||
traceswo_init(swo_channelmask);
|
traceswo_init(swo_channelmask);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
serial_no_read();
|
|
||||||
gdb_outf("Trace enabled for BMP serial %s, USB EP 5\n", serial_no);
|
gdb_outf("Trace enabled for BMP serial %s, USB EP 5\n", serial_no);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,6 @@
|
||||||
|
|
||||||
extern char serial_no[DFU_SERIAL_LENGTH];
|
extern char serial_no[DFU_SERIAL_LENGTH];
|
||||||
|
|
||||||
void serial_no_read(void);
|
void read_serial_number(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -33,7 +33,7 @@ static uint8_t usbd_control_buffer[256];
|
||||||
|
|
||||||
void blackmagic_usb_init(void)
|
void blackmagic_usb_init(void)
|
||||||
{
|
{
|
||||||
serial_no_read();
|
read_serial_number();
|
||||||
|
|
||||||
usbdev = usbd_init(&USB_DRIVER, &dev_desc, &config, usb_strings, sizeof(usb_strings) / sizeof(char *),
|
usbdev = usbd_init(&USB_DRIVER, &dev_desc, &config, usb_strings, sizeof(usb_strings) / sizeof(char *),
|
||||||
usbd_control_buffer, sizeof(usbd_control_buffer));
|
usbd_control_buffer, sizeof(usbd_control_buffer));
|
||||||
|
|
|
@ -116,7 +116,7 @@ const char *platform_target_voltage(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void serial_no_read(void)
|
void read_serial_number(void)
|
||||||
{
|
{
|
||||||
/* FIXME: Store a unique serial number somewhere and retreive here */
|
/* FIXME: Store a unique serial number somewhere and retreive here */
|
||||||
uint32_t unique_id = SERIAL_NO;
|
uint32_t unique_id = SERIAL_NO;
|
||||||
|
|
|
@ -347,5 +347,5 @@ static void get_dev_unique_id(void)
|
||||||
fuse_flash_size = 0x80;
|
fuse_flash_size = 0x80;
|
||||||
set_dfu_iface_string(fuse_flash_size - 8);
|
set_dfu_iface_string(fuse_flash_size - 8);
|
||||||
max_address = FLASH_BASE + (fuse_flash_size << 10);
|
max_address = FLASH_BASE + (fuse_flash_size << 10);
|
||||||
serial_no_read();
|
read_serial_number();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
char serial_no[DFU_SERIAL_LENGTH];
|
char serial_no[DFU_SERIAL_LENGTH];
|
||||||
|
|
||||||
void serial_no_read(void)
|
void read_serial_number(void)
|
||||||
{
|
{
|
||||||
#if DFU_SERIAL_LENGTH == 9
|
#if DFU_SERIAL_LENGTH == 9
|
||||||
const volatile uint32_t *const unique_id_p = (uint32_t *)DESIG_UNIQUE_ID_BASE;
|
const volatile uint32_t *const unique_id_p = (uint32_t *)DESIG_UNIQUE_ID_BASE;
|
||||||
|
|
Loading…
Reference in New Issue