DFU: fix DP pull down
This commit is contained in:
parent
51e0bfd188
commit
ff5fbc847d
@ -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++);
|
||||
|
Loading…
Reference in New Issue
Block a user