diff --git a/src/command.c b/src/command.c index e47239a..5bf2754 100644 --- a/src/command.c +++ b/src/command.c @@ -608,7 +608,6 @@ static bool cmd_traceswo(target *t, int argc, const char **argv) traceswo_init(swo_channelmask); #endif - serial_no_read(); gdb_outf("Trace enabled for BMP serial %s, USB EP 5\n", serial_no); return true; } diff --git a/src/include/serialno.h b/src/include/serialno.h index 1352595..5b7fd5d 100644 --- a/src/include/serialno.h +++ b/src/include/serialno.h @@ -26,6 +26,6 @@ extern char serial_no[DFU_SERIAL_LENGTH]; -void serial_no_read(void); +void read_serial_number(void); #endif diff --git a/src/platforms/common/usb.c b/src/platforms/common/usb.c index c0fde7f..53bfe65 100644 --- a/src/platforms/common/usb.c +++ b/src/platforms/common/usb.c @@ -33,7 +33,7 @@ static uint8_t usbd_control_buffer[256]; 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 *), usbd_control_buffer, sizeof(usbd_control_buffer)); diff --git a/src/platforms/launchpad-icdi/platform.c b/src/platforms/launchpad-icdi/platform.c index 768b3ee..29bb6be 100644 --- a/src/platforms/launchpad-icdi/platform.c +++ b/src/platforms/launchpad-icdi/platform.c @@ -116,7 +116,7 @@ const char *platform_target_voltage(void) return NULL; } -void serial_no_read(void) +void read_serial_number(void) { /* FIXME: Store a unique serial number somewhere and retreive here */ uint32_t unique_id = SERIAL_NO; diff --git a/src/platforms/stm32/dfucore.c b/src/platforms/stm32/dfucore.c index 8029ca3..b535e74 100644 --- a/src/platforms/stm32/dfucore.c +++ b/src/platforms/stm32/dfucore.c @@ -347,5 +347,5 @@ static void get_dev_unique_id(void) fuse_flash_size = 0x80; set_dfu_iface_string(fuse_flash_size - 8); max_address = FLASH_BASE + (fuse_flash_size << 10); - serial_no_read(); + read_serial_number(); } diff --git a/src/platforms/stm32/serialno.c b/src/platforms/stm32/serialno.c index 9053885..dbdf89e 100644 --- a/src/platforms/stm32/serialno.c +++ b/src/platforms/stm32/serialno.c @@ -22,7 +22,7 @@ char serial_no[DFU_SERIAL_LENGTH]; -void serial_no_read(void) +void read_serial_number(void) { #if DFU_SERIAL_LENGTH == 9 const volatile uint32_t *const unique_id_p = (uint32_t *)DESIG_UNIQUE_ID_BASE;