Skip to content

Commit fe507af

Browse files
committed
STM32 USBHOST: Corrections for DISCO_F746NG
1 parent 29b4aaf commit fe507af

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

features/unsupported/USBHost/targets/TARGET_STM/USBHALHost_STM.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
#define USBHALHOST_STM_H
2020

2121
#if defined(TARGET_DISCO_F746NG)
22-
// Select only one line
22+
#if (MBED_CONF_TARGET_USB_SPEED == 1) // Defined in json configuration file
23+
#define TARGET_DISCO_F746NG_HS
24+
#else
2325
#define TARGET_DISCO_F746NG_FS
24-
//#define TARGET_DISCO_F746NG_HS
26+
#endif
2527
#endif
2628

2729
#if defined(TARGET_DISCO_F429ZI) || defined(TARGET_DISCO_F746NG_HS) || defined(TARGET_DISCO_F769NI)
@@ -136,7 +138,7 @@ void usb_vbus( uint8_t state)
136138
USBHALHost::USBHALHost()
137139
{
138140
instHost = this;
139-
HCD_HandleTypeDef *hhcd;
141+
HCD_HandleTypeDef *hhcd = {0};
140142
USBHALHost_Private_t *HALPriv = new(USBHALHost_Private_t);
141143

142144
memset(HALPriv, 0, sizeof(USBHALHost_Private_t));

targets/targets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,7 @@
15951595
}
15961596
},
15971597
"detect_code": ["0815"],
1598+
"macros_add": ["USB_STM_HAL", "USBHOST_OTHER"],
15981599
"device_has_add": ["ANALOGOUT", "CAN", "LOWPOWERTIMER", "SERIAL_ASYNCH", "TRNG", "FLASH"],
15991600
"features": ["LWIP"],
16001601
"release_versions": ["2", "5"],

0 commit comments

Comments
 (0)