Skip to content

Commit aa86004

Browse files
committed
Add full/high speed compile flag for Microchip SAME70 examples
Default is still high speed, but setting SPEED=high|full work as expected. `make BOARD=same70_xplained SPEED=full` Tested with examples/device/cdc_msc ```preformatted lsusb -v ... TinyUSB Device: Product ID: 0x4003 Vendor ID: 0xcafe Version: 1.00 Serial Number: 0123456789ABCDEF Speed: Up to 12 Mb/s <------ full speed here Manufacturer: TinyUSB Location ID: 0x03142130 / 12 Current Available (mA): 500 Current Required (mA): 100 Extra Operating Current (mA): 0 Media: Mass Storage: Capacity: 8 KB (8,192 bytes) Removable Media: Yes BSD Name: disk5 Logical Unit: 0 Partition Map Type: Unknown S.M.A.R.T. status: Verified USB Interface: 2 ```
1 parent 9d2fd6c commit aa86004

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

hw/bsp/same70_xplained/board.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ CFLAGS += \
1414
# suppress following warnings from mcu driver
1515
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=redundant-decls
1616

17+
SPEED ?= high
18+
19+
ifeq ($(SPEED), high)
20+
CFLAGS += -DBOARD_TUD_MAX_SPEED=OPT_MODE_HIGH_SPEED
21+
else
22+
CFLAGS += -DBOARD_TUD_MAX_SPEED=OPT_MODE_FULL_SPEED
23+
endif
24+
1725
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
1826
CFLAGS_SKIP += -Wcast-qual
1927

0 commit comments

Comments
 (0)