Skip to content

Commit ed9bb98

Browse files
bcostmadbridge
authored andcommitted
STM32 USBHOST: Corrections for DISCO_F746NG
1 parent f09c1f6 commit ed9bb98

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
@@ -1631,6 +1631,7 @@
16311631
}
16321632
},
16331633
"detect_code": ["0815"],
1634+
"macros_add": ["USB_STM_HAL", "USBHOST_OTHER"],
16341635
"device_has_add": ["ANALOGOUT", "CAN", "LOWPOWERTIMER", "SERIAL_ASYNCH", "TRNG", "FLASH"],
16351636
"features": ["LWIP"],
16361637
"release_versions": ["2", "5"],

0 commit comments

Comments
 (0)