Skip to content

Commit e900175

Browse files
committed
fix: some STM32 mcu have only USB_OTG_HS available
generate an explicit #error ex: STM32H723ZGTx have only USB_OTG_HS Fixes #1931 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 99cc110 commit e900175

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cores/arduino/stm32/usb/usbd_conf.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ extern "C" {
3535
#if defined(USE_USB_HS) && !defined(USB_OTG_HS)
3636
#error "This board does not support USB High Speed! Select 'Full Speed' in the 'Tools->USB interface' menu"
3737
#endif
38+
#if !defined(USB_BASE) && !defined(USB_OTG_FS) && defined(USB_OTG_HS) && !defined(USE_USB_HS)
39+
#error "This board support only USB High Speed! Select 'High Speed' or 'High Speed in Full Speed mode' in the 'Tools->USB interface' menu"
40+
#endif
41+
3842

3943
#include <stdio.h>
4044
#include <stdlib.h>

0 commit comments

Comments
 (0)