From 54dd788f2b223869854532d2df64ee9ab9e6d507 Mon Sep 17 00:00:00 2001 From: Roger Clark Date: Thu, 6 Jul 2017 10:57:20 +1000 Subject: [PATCH] Fix warning caused by commit #f7a576f2e0efcee958bdfd737d9af7a2f6c76051 --- STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c | 4 ++-- STM32F1/cores/maple/usb_serial.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c b/STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c index 774be42..cba050f 100644 --- a/STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c +++ b/STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c @@ -62,8 +62,8 @@ #if !(defined(BOARD_maple) || defined(BOARD_maple_RET6) || \ defined(BOARD_maple_mini) || defined(BOARD_maple_native)) -#warning USB CDC ACM relies on LeafLabs board-specific configuration.\ - You may have problems on non-LeafLabs boards. +//#warning USB CDC ACM relies on LeafLabs board-specific configuration.\ +// You may have problems on non-LeafLabs boards. #endif static void vcomDataTxCb(void); diff --git a/STM32F1/cores/maple/usb_serial.cpp b/STM32F1/cores/maple/usb_serial.cpp index 1fe2bf4..6cffbf5 100644 --- a/STM32F1/cores/maple/usb_serial.cpp +++ b/STM32F1/cores/maple/usb_serial.cpp @@ -71,7 +71,7 @@ void USBSerial::begin(void) { return; _hasBegun = true; - usb_cdcacm_enable(BOARD_USB_DISC_DEV, BOARD_USB_DISC_BIT); + usb_cdcacm_enable(BOARD_USB_DISC_DEV, (uint8_t)BOARD_USB_DISC_BIT); usb_cdcacm_set_hooks(USB_CDCACM_HOOK_RX, rxHook); usb_cdcacm_set_hooks(USB_CDCACM_HOOK_IFACE_SETUP, ifaceSetupHook); #endif @@ -97,7 +97,7 @@ volatile uint8_t removeCompilerWarningsIgnore=ignore; void USBSerial::end(void) { #if BOARD_HAVE_SERIALUSB - usb_cdcacm_disable(BOARD_USB_DISC_DEV, BOARD_USB_DISC_BIT); + usb_cdcacm_disable(BOARD_USB_DISC_DEV, (uint8_t)BOARD_USB_DISC_BIT); usb_cdcacm_remove_hooks(USB_CDCACM_HOOK_RX | USB_CDCACM_HOOK_IFACE_SETUP); _hasBegun = false; #endif