diff --git a/cores/arduino/stm32/bootloader.h b/cores/arduino/stm32/bootloader.h index 5e69157e12..93931dfb46 100644 --- a/cores/arduino/stm32/bootloader.h +++ b/cores/arduino/stm32/bootloader.h @@ -1,6 +1,8 @@ #ifndef _BOOTLOADER_H_ #define _BOOTLOADER_H_ +#include + /* Ensure DTR_TOGGLING_SEQ enabled */ #if defined(BL_LEGACY_LEAF) || defined(BL_HID) #ifndef DTR_TOGGLING_SEQ @@ -12,6 +14,11 @@ extern "C" { #endif /* __cplusplus */ +#ifdef DTR_TOGGLING_SEQ +/* DTR toggling sequence management */ +void dtr_togglingHook(uint8_t *buf, uint32_t *len); +#endif + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/cores/arduino/stm32/usb/cdc/usbd_cdc_if.c b/cores/arduino/stm32/usb/cdc/usbd_cdc_if.c index b4b1933a6a..c596b899f4 100644 --- a/cores/arduino/stm32/usb/cdc/usbd_cdc_if.c +++ b/cores/arduino/stm32/usb/cdc/usbd_cdc_if.c @@ -56,8 +56,6 @@ __IO bool receivePended = true; static uint32_t transmitStart = 0; #ifdef DTR_TOGGLING_SEQ -/* DTR toggling sequence management */ -extern void dtr_togglingHook(uint8_t *buf, uint32_t *len); uint8_t dtr_toggling = 0; #endif