File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,25 @@ ifndef USB_DEVICES
119
119
USB_DEVICES = "CDC,MSC,AUDIO,HID"
120
120
endif
121
121
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
+
122
131
ifndef USB_HID_DEVICES
123
132
USB_HID_DEVICES = "KEYBOARD,MOUSE,CONSUMER,GAMEPAD"
124
133
endif
125
134
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
+
126
141
ifndef USB_MSC_MAX_PACKET_SIZE
127
142
USB_MSC_MAX_PACKET_SIZE = 64
128
143
endif
You can’t perform that action at this time.
0 commit comments