serialno: Improved the naming of the serial number reading function

This commit is contained in:
dragonmux 2022-08-10 07:17:15 +01:00 committed by Piotr Esden-Tempski
parent 886c790b25
commit 400ee0c76c
6 changed files with 5 additions and 6 deletions

View File

@ -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;
}

View File

@ -26,6 +26,6 @@
extern char serial_no[DFU_SERIAL_LENGTH];
void serial_no_read(void);
void read_serial_number(void);
#endif

View File

@ -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));

View File

@ -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;

View File

@ -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();
}

View File

@ -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;