mirror of https://github.com/rusefi/rusefi-1.git
helping build
This commit is contained in:
parent
6f0c545e19
commit
11167dcfed
|
@ -134,7 +134,9 @@ int getAdcChannelPin(adc_channel_e hwChannel) {
|
||||||
return getHwPin("get_pin", brainPin);
|
return getHwPin("get_pin", brainPin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAL_USE_SERIAL_USB
|
||||||
extern SerialUSBDriver SDU1;
|
extern SerialUSBDriver SDU1;
|
||||||
|
#endif /* HAL_USE_SERIAL_USB */
|
||||||
|
|
||||||
void jump_to_bootloader() {
|
void jump_to_bootloader() {
|
||||||
// AN2606 Application note
|
// AN2606 Application note
|
||||||
|
@ -146,12 +148,14 @@ void jump_to_bootloader() {
|
||||||
RCC->CR &= RCC_CR_HSITRIM | RCC_CR_HSION; /* CR Reset value. */
|
RCC->CR &= RCC_CR_HSITRIM | RCC_CR_HSION; /* CR Reset value. */
|
||||||
RCC->CFGR = 0; /* CFGR reset value. */
|
RCC->CFGR = 0; /* CFGR reset value. */
|
||||||
|
|
||||||
|
#if HAL_USE_SERIAL_USB
|
||||||
usbDisconnectBus(&USBD1);
|
usbDisconnectBus(&USBD1);
|
||||||
chThdSleepMilliseconds(1500);
|
chThdSleepMilliseconds(1500);
|
||||||
|
|
||||||
sdStop (&USB_SERIAL_DRIVER);
|
sdStop (&USB_SERIAL_DRIVER);
|
||||||
sduStop (&SDU1);
|
sduStop (&SDU1);
|
||||||
usbStop (&USBD1);
|
usbStop (&USBD1);
|
||||||
|
#endif /* HAL_USE_SERIAL_USB */
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
chSysDisable();
|
chSysDisable();
|
||||||
// reset the Systick Timer
|
// reset the Systick Timer
|
||||||
|
|
Loading…
Reference in New Issue