From b1073c165f42a3af53280fd72ab2bf9dea55f5b9 Mon Sep 17 00:00:00 2001 From: bcostm Date: Thu, 23 Nov 2017 13:17:34 +0100 Subject: [PATCH 1/2] DISCO_F746NG: add usp_speed config --- .../USBDevice/targets/TARGET_STM/USBHAL_IP_OTGFSHS.h | 9 ++++----- targets/targets.json | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/features/unsupported/USBDevice/targets/TARGET_STM/USBHAL_IP_OTGFSHS.h b/features/unsupported/USBDevice/targets/TARGET_STM/USBHAL_IP_OTGFSHS.h index 594920d5e8..7867b5431e 100644 --- a/features/unsupported/USBDevice/targets/TARGET_STM/USBHAL_IP_OTGFSHS.h +++ b/features/unsupported/USBDevice/targets/TARGET_STM/USBHAL_IP_OTGFSHS.h @@ -18,13 +18,12 @@ #ifndef USBHAL_IP_OTGFSHS_H #define USBHAL_IP_OTGFSHS_H -//================================================================== -// This board has both USB OTG FS and HS connectors. -// Select one line only. -//================================================================== #if defined(TARGET_DISCO_F746NG) -//#define TARGET_DISCO_F746NG_OTG_FS +#if (MBED_CONF_TARGET_USB_SPEED == 1) // Defined in json configuration file #define TARGET_DISCO_F746NG_OTG_HS +#else +#define TARGET_DISCO_F746NG_OTG_FS +#endif #endif #if defined(TARGET_DISCO_F429ZI) || \ diff --git a/targets/targets.json b/targets/targets.json index f51a92d6f2..598637df34 100755 --- a/targets/targets.json +++ b/targets/targets.json @@ -1592,6 +1592,10 @@ "help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL | USE_PLL_HSI", "value": "USE_PLL_HSE_XTAL|USE_PLL_HSI", "macro_name": "CLOCK_SOURCE" + }, + "usb_speed": { + "help": "Select the USB connector (0=FullSpeed, 1=HighSpeed))", + "value": "1" } }, "detect_code": ["0815"], From 26f24ada103ddcacf246dd04e00aa1dc12b55ad8 Mon Sep 17 00:00:00 2001 From: bcostm Date: Mon, 27 Nov 2017 09:46:36 +0100 Subject: [PATCH 2/2] DISCO_F746NG: typo in config name --- targets/targets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/targets.json b/targets/targets.json index 598637df34..f426f56422 100755 --- a/targets/targets.json +++ b/targets/targets.json @@ -1594,7 +1594,7 @@ "macro_name": "CLOCK_SOURCE" }, "usb_speed": { - "help": "Select the USB connector (0=FullSpeed, 1=HighSpeed))", + "help": "Select the USB speed/connector (0=FullSpeed, 1=HighSpeed)", "value": "1" } },