From 83dbc1cd8f87b06d124e9e3bffe9eb6a6df83a9d Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Wed, 16 Oct 2019 14:45:35 +0200 Subject: [PATCH] Clean declaration Signed-off-by: Frederic Pillon --- cores/arduino/stm32/bootloader.h | 7 +++++++ cores/arduino/stm32/usb/cdc/usbd_cdc_if.c | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cores/arduino/stm32/bootloader.h b/cores/arduino/stm32/bootloader.h index 118bc7b860..aa9e243da4 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 c09675f95e..c97ea4d04b 100644 --- a/cores/arduino/stm32/usb/cdc/usbd_cdc_if.c +++ b/cores/arduino/stm32/usb/cdc/usbd_cdc_if.c @@ -56,8 +56,7 @@ __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