Skip to content

Commit b1073c1

Browse files
committed
DISCO_F746NG: add usp_speed config
1 parent 4e22295 commit b1073c1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

features/unsupported/USBDevice/targets/TARGET_STM/USBHAL_IP_OTGFSHS.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
#ifndef USBHAL_IP_OTGFSHS_H
1919
#define USBHAL_IP_OTGFSHS_H
2020

21-
//==================================================================
22-
// This board has both USB OTG FS and HS connectors.
23-
// Select one line only.
24-
//==================================================================
2521
#if defined(TARGET_DISCO_F746NG)
26-
//#define TARGET_DISCO_F746NG_OTG_FS
22+
#if (MBED_CONF_TARGET_USB_SPEED == 1) // Defined in json configuration file
2723
#define TARGET_DISCO_F746NG_OTG_HS
24+
#else
25+
#define TARGET_DISCO_F746NG_OTG_FS
26+
#endif
2827
#endif
2928

3029
#if defined(TARGET_DISCO_F429ZI) || \

targets/targets.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,6 +1592,10 @@
15921592
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL | USE_PLL_HSI",
15931593
"value": "USE_PLL_HSE_XTAL|USE_PLL_HSI",
15941594
"macro_name": "CLOCK_SOURCE"
1595+
},
1596+
"usb_speed": {
1597+
"help": "Select the USB connector (0=FullSpeed, 1=HighSpeed))",
1598+
"value": "1"
15951599
}
15961600
},
15971601
"detect_code": ["0815"],

0 commit comments

Comments
 (0)