From 8e5ac060f2c5f69bc75db91f5d0256487b09176d Mon Sep 17 00:00:00 2001 From: ChaeHee Won Date: Fri, 28 Dec 2018 14:31:28 -0500 Subject: [PATCH] Add USBD_LL_ConnectionState_WEAK definition and use this to make weak function. --- cores/arduino/stm32/usb_serial.h | 4 ---- variants/CATENA_461x/usb/usbd_conf.c | 2 +- variants/CATENA_461x/usb/usbd_conf.h | 1 + 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cores/arduino/stm32/usb_serial.h b/cores/arduino/stm32/usb_serial.h index 6b4b265b27..b44b5a0fcb 100644 --- a/cores/arduino/stm32/usb_serial.h +++ b/cores/arduino/stm32/usb_serial.h @@ -56,10 +56,6 @@ class USBSerial : public Stream int availableForWrite(void); virtual size_t write(uint8_t); virtual size_t write(const uint8_t *buffer, size_t size); - inline size_t write(unsigned long n) { return write((uint8_t)n); } - inline size_t write(long n) { return write((uint8_t)n); } - inline size_t write(unsigned int n) { return write((uint8_t)n); } - inline size_t write(int n) { return write((uint8_t)n); } using Print::write; bool dtr(void); diff --git a/variants/CATENA_461x/usb/usbd_conf.c b/variants/CATENA_461x/usb/usbd_conf.c index 5a7492b797..2a45fcc389 100644 --- a/variants/CATENA_461x/usb/usbd_conf.c +++ b/variants/CATENA_461x/usb/usbd_conf.c @@ -584,7 +584,7 @@ void USBD_LL_DisableIRQ(void) * @param None * @retval 0 if disconnected */ -uint32_t USBD_LL_ConnectionState(void) +USBD_LL_ConnectionState_WEAK uint32_t USBD_LL_ConnectionState(void) { uint32_t vBus; diff --git a/variants/CATENA_461x/usb/usbd_conf.h b/variants/CATENA_461x/usb/usbd_conf.h index 9c9bef747c..481ac6ee48 100644 --- a/variants/CATENA_461x/usb/usbd_conf.h +++ b/variants/CATENA_461x/usb/usbd_conf.h @@ -70,6 +70,7 @@ #define USBD_DEBUG_LEVEL 0 #define USBD_CDC_INTERVAL 1000 +#define USBD_LL_ConnectionState_WEAK __weak /* Exported macro ------------------------------------------------------------*/ /****************************************/