summaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
authorroot <root@ka-ata-killa.ourano.james.local>2021-03-03 17:25:36 +0000
committerroot <root@ka-ata-killa.ourano.james.local>2021-03-03 17:25:36 +0000
commitf519bbe55f6917d86af6bb4946dfef073175d8f3 (patch)
treeee199b6e144f126cc2811bae4cee257414da4457 /boot
parentf10c1497babaf3010def44a999092a4b55e84460 (diff)
downloadclock-f519bbe55f6917d86af6bb4946dfef073175d8f3.tar.gz
clock-f519bbe55f6917d86af6bb4946dfef073175d8f3.tar.bz2
clock-f519bbe55f6917d86af6bb4946dfef073175d8f3.zip
cosmetic changes
Diffstat (limited to 'boot')
-rw-r--r--boot/usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/boot/usb.c b/boot/usb.c
index 1454750..7670491 100644
--- a/boot/usb.c
+++ b/boot/usb.c
@@ -51,6 +51,7 @@ static const char *usb_strings[] = {
/* This string is used by ST Microelectronics' DfuSe utility. */
"@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg",
};
+#define N_USB_STRINGS (sizeof(usb_strings)/sizeof(usb_strings[0]))
void
usb_set_config (usbd_device *usbd_dev, uint16_t wValue)
@@ -79,7 +80,7 @@ void usb (void)
MAP_AF_100 (USB_DM, GPIO_AF10);
- usbd_dev = usbd_init (&otgfs_usb_driver, &dev, &config, usb_strings, 4, usbd_control_buffer, sizeof (usbd_control_buffer));
+ usbd_dev = usbd_init (&otgfs_usb_driver, &dev, &config, usb_strings, N_USB_STRINGS, usbd_control_buffer, sizeof (usbd_control_buffer));
OTG_FS_GCCFG |= OTG_GCCFG_NOVBUSSENS;
OTG_FS_GCCFG &= ~OTG_GCCFG_VBUSASEN;