Skip to content

Commit 221b8a8

Browse files
authored
Merge pull request #5580 from bcostm/dev_usb_speed_disco-f746ng
DISCO_F746NG: add usp_speed configuration
2 parents 2b84a17 + 26f24ad commit 221b8a8

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
@@ -1595,6 +1595,10 @@
15951595
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL | USE_PLL_HSI",
15961596
"value": "USE_PLL_HSE_XTAL|USE_PLL_HSI",
15971597
"macro_name": "CLOCK_SOURCE"
1598+
},
1599+
"usb_speed": {
1600+
"help": "Select the USB speed/connector (0=FullSpeed, 1=HighSpeed)",
1601+
"value": "1"
15981602
}
15991603
},
16001604
"detect_code": ["0815"],

0 commit comments

Comments
 (0)