File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,10 +119,25 @@ ifndef USB_DEVICES
119119USB_DEVICES = "CDC,MSC,AUDIO,HID"
120120endif
121121
122+ USB_DEVICES_COMPUTED := CDC,MSC
123+ ifeq ($(CIRCUITPY_USB_MIDI ) ,1)
124+ USB_DEVICES_COMPUTED := $(USB_DEVICES_COMPUTED ) ,AUDIO
125+ endif
126+ ifeq ($(CIRCUITPY_USB_HID ) ,1)
127+ USB_DEVICES_COMPUTED := $(USB_DEVICES_COMPUTED ) ,HID
128+ endif
129+ USB_DEVICES_COMPUTED := "$(USB_DEVICES_COMPUTED ) "
130+
122131ifndef USB_HID_DEVICES
123132USB_HID_DEVICES = "KEYBOARD,MOUSE,CONSUMER,GAMEPAD"
124133endif
125134
135+ # During a transitional period, check that the COMPUTED values match.
136+ # Once they do all match, we can remove all the hard-coded ones.
137+ ifneq ($(USB_DEVICES ) ,$(USB_DEVICES_COMPUTED ) )
138+ $(error Computed USB devices '$(USB_DEVICES_COMPUTED)' different than hard-coded USB devices '$(USB_DEVICES)')
139+ endif
140+
126141ifndef USB_MSC_MAX_PACKET_SIZE
127142USB_MSC_MAX_PACKET_SIZE = 64
128143endif
You can’t perform that action at this time.
0 commit comments