supervisor.mk: Compute what USB_DEVICES should be, and check it against what it is
This commit is contained in:
parent
9d5ccccf7d
commit
8bbd539031
@ -119,10 +119,25 @@ ifndef USB_DEVICES
|
||||
USB_DEVICES = "CDC,MSC,AUDIO,HID"
|
||||
endif
|
||||
|
||||
USB_DEVICES_COMPUTED := CDC,MSC
|
||||
ifeq ($(CIRCUITPY_USB_MIDI),1)
|
||||
USB_DEVICES_COMPUTED := $(USB_DEVICES_COMPUTED),AUDIO
|
||||
endif
|
||||
ifeq ($(CIRCUITPY_USB_HID),1)
|
||||
USB_DEVICES_COMPUTED := $(USB_DEVICES_COMPUTED),HID
|
||||
endif
|
||||
USB_DEVICES_COMPUTED := "$(USB_DEVICES_COMPUTED)"
|
||||
|
||||
ifndef USB_HID_DEVICES
|
||||
USB_HID_DEVICES = "KEYBOARD,MOUSE,CONSUMER,GAMEPAD"
|
||||
endif
|
||||
|
||||
# During a transitional period, check that the COMPUTED values match.
|
||||
# Once they do all match, we can remove all the hard-coded ones.
|
||||
ifneq ($(USB_DEVICES),$(USB_DEVICES_COMPUTED))
|
||||
$(error Computed USB devices '$(USB_DEVICES_COMPUTED)' different than hard-coded USB devices '$(USB_DEVICES)')
|
||||
endif
|
||||
|
||||
ifndef USB_MSC_MAX_PACKET_SIZE
|
||||
USB_MSC_MAX_PACKET_SIZE = 64
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user