change REDUCE_SPEED=0/1 to explicitly SPEED=high/full

update readme, boards.md to add link to new stm boards
This commit is contained in:
hathach
2020-07-08 16:29:48 +07:00
parent f82655a212
commit 0fd074afd8
7 changed files with 58 additions and 42 deletions
+7 -6
View File
@@ -1,6 +1,6 @@
# Only OTG-HS has a connector on this board
REDUCE_SPEED ?= 0
SPEED ?= high
CFLAGS += \
-flto \
@@ -14,12 +14,13 @@ CFLAGS += \
-DHSE_VALUE=25000000 \
-DCFG_TUSB_MCU=OPT_MCU_STM32F7 \
-DBOARD_DEVICE_RHPORT_NUM=1
ifeq ($(REDUCE_SPEED), 0)
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
$(info "Using OTG_HS in HS mode")
ifeq ($(SPEED), high)
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
$(info "Using OTG_HS in HighSpeed mode")
else
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_FULL_SPEED
$(info "Using OTG_HS in FS mode")
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_FULL_SPEED
$(info "Using OTG_HS in FullSpeed mode")
endif
# mcu driver cause following warnings
+9 -9
View File
@@ -1,5 +1,5 @@
PORT ?= 1
REDUCE_SPEED ?= 0
SPEED ?= high
CFLAGS += \
-flto \
@@ -15,15 +15,15 @@ CFLAGS += \
-DBOARD_DEVICE_RHPORT_NUM=$(PORT)
ifeq ($(PORT), 1)
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
ifeq ($(SPEED), high)
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
$(info "Using OTG_HS in HighSpeed mode")
else
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_FULL_SPEED
$(info "Using OTG_HS in FullSpeed mode")
endif
else
$(info "Using OTG_FS")
$(info "Using OTG_FS")
endif
# mcu driver cause following warnings
+9 -9
View File
@@ -1,5 +1,5 @@
PORT ?= 0
REDUCE_SPEED ?= 0
SPEED ?= high
CFLAGS += \
-flto \
@@ -15,15 +15,15 @@ CFLAGS += \
-DBOARD_DEVICE_RHPORT_NUM=$(PORT)
ifeq ($(PORT), 1)
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
ifeq ($(SPEED), high)
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
$(info "Using OTG_HS in HighSpeed mode")
else
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_FULL_SPEED
$(info "Using OTG_HS in FullSpeed mode")
endif
else
$(info "Using OTG_FS")
$(info "Using OTG_FS")
endif
# mcu driver cause following warnings
+8 -6
View File
@@ -1,4 +1,6 @@
REDUCE_SPEED ?= 0
# Only OTG-HS has a connector on this board
SPEED ?= high
CFLAGS += \
-flto \
@@ -13,12 +15,12 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32F7 \
-DBOARD_DEVICE_RHPORT_NUM=1 \
ifeq ($(REDUCE_SPEED), 0)
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
$(info "Using OTG_HS in HS mode")
ifeq ($(SPEED), high)
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_HIGH_SPEED
$(info "Using OTG_HS in HighSpeed mode")
else
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_FULL_SPEED
$(info "Using OTG_HS in FS mode")
CFLAGS += -DBOARD_DEVICE_RHPORT_SPEED=OPT_MODE_FULL_SPEED
$(info "Using OTG_HS in FullSpeed mode")
endif
# suppress warning caused by vendor mcu driver