diff --git a/lib/usb_dfu.c b/lib/usb_dfu.c index c975ccb..c1bd6c6 100644 --- a/lib/usb_dfu.c +++ b/lib/usb_dfu.c @@ -132,8 +132,8 @@ static void usb_disconnect(void) } // pull USB D+ low for a short while rcc_periph_clock_enable(RCC_GPIOA); - gpio_mode_setup(GPIO_PORT(LED_PIN), GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO_PIN(LED_PIN)); - gpio_set_output_options(GPIO_PORT(LED_PIN), GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, GPIO_PIN(LED_PIN)); + gpio_mode_setup(GPIOA, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO12); + gpio_set_output_options(GPIOA, GPIO_OTYPE_PP, GPIO_OSPEED_2MHZ, GPIO12); gpio_clear(GPIOA, GPIO12); // USB disconnected must be at least 10 ms long, at most 100 ms for (volatile uint32_t i = 0; i < 0x8000; i++);