From c31dfbc174b094b5e73e1a4d3a498eec1fc7d488 Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Thu, 3 May 2018 18:10:34 -0500 Subject: [PATCH] Only build in USBPhy_STM32 for supported devices Define USBSTM_HAL_UNSUPPORTED if DEVICE_USBDEVICE is undefined or defined to 0. --- usb/device/targets/TARGET_STM/USBPhy_STM32.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usb/device/targets/TARGET_STM/USBPhy_STM32.cpp b/usb/device/targets/TARGET_STM/USBPhy_STM32.cpp index e8ab482f75..91facb6369 100644 --- a/usb/device/targets/TARGET_STM/USBPhy_STM32.cpp +++ b/usb/device/targets/TARGET_STM/USBPhy_STM32.cpp @@ -14,6 +14,11 @@ * limitations under the License. */ +/* This target doesn't support USB */ +#if !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE +#define USBSTM_HAL_UNSUPPORTED +#endif + /* TARGET NOT STM does not support this HAL */ #ifndef TARGET_STM #define USBSTM_HAL_UNSUPPORTED