Browse Source

serialno: Improved the naming of the serial number reading function

pull/443/merge
dragonmux 2 years ago
committed by Piotr Esden-Tempski
parent
commit
400ee0c76c
  1. 1
      src/command.c
  2. 2
      src/include/serialno.h
  3. 2
      src/platforms/common/usb.c
  4. 2
      src/platforms/launchpad-icdi/platform.c
  5. 2
      src/platforms/stm32/dfucore.c
  6. 2
      src/platforms/stm32/serialno.c

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

2
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

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

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

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

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

Loading…
Cancel
Save