STM32/OTG_HS: Allow OTG_HS port to run at FS speed.

Add "REDUCE_SPEED=1" to the compile options.
This commit is contained in:
Uwe Bonnes
2020-07-01 23:07:18 +02:00
parent 4cec866994
commit fd38178189
6 changed files with 47 additions and 15 deletions
+10 -1
View File
@@ -1,3 +1,5 @@
REDUCE_SPEED ?= 0
CFLAGS += \
-flto \
-mthumb \
@@ -10,7 +12,14 @@ CFLAGS += \
-DHSE_VALUE=25000000 \
-DCFG_TUSB_MCU=OPT_MCU_STM32F7 \
-DBOARD_DEVICE_RHPORT_NUM=1 \
-DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
ifeq ($(REDUCE_SPEED), 0)
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
$(info "Using OTG_HS in HS mode")
else
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_FULL_SPEED
$(info "Using OTG_HS in FS mode")
endif
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=cast-align -Wno-error=shadow