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

View File

@@ -1,5 +1,5 @@
# Default is Highspeed port
PORT ?= 1
REDUCE_SPEED ?= 0
CFLAGS += \
-flto \
@@ -15,10 +15,15 @@ CFLAGS += \
-DBOARD_DEVICE_RHPORT_NUM=$(PORT)
ifeq ($(PORT), 1)
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
$(info "PORT1 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
else
$(info "PORT0 Full Speed")
$(info "Using OTG_FS")
endif
# mcu driver cause following warnings