handle := defs in shared_bindings_matrix.py; update adafruit_hid

This commit is contained in:
Dan Halbert 2021-05-04 18:07:01 -04:00
parent adc3d7d55e
commit 8bb3c6fd79
3 changed files with 6 additions and 5 deletions

View File

@ -155,7 +155,8 @@ def get_settings_from_makefile(port_dir, board_name):
settings = {}
for line in contents.stdout.split('\n'):
m = re.match(r'^([A-Z][A-Z0-9_]*) = (.*)$', line)
# Handle both = and := definitions.
m = re.match(r'^([A-Z][A-Z0-9_]*) :?= (.*)$', line)
if m:
settings[m.group(1)] = m.group(2)

@ -1 +1 @@
Subproject commit 829ba0f0a2d8a63f7d0215c6c9fc821e14e52a93
Subproject commit de68b7d4575151c1648c734559e59c2932965939

View File

@ -332,8 +332,8 @@ CFLAGS += -DCIRCUITPY_UHEAP=$(CIRCUITPY_UHEAP)
CIRCUITPY_USB ?= 1
CFLAGS += -DCIRCUITPY_USB=$(CIRCUITPY_USB)
# If you need to count endpoints, use:
# $(shell expr $(USB_NUM_EP) '>=' 8)
# Compute this value once, so the shell command is not reinvoked many times.
USB_NUM_EP_8_OR_GREATER := $(shell expr $(USB_NUM_EP) '>=' 8)
CIRCUITPY_USB_CDC ?= 1
CFLAGS += -DCIRCUITPY_USB_CDC=$(CIRCUITPY_USB_CDC)
@ -348,7 +348,7 @@ CIRCUITPY_USB_HID_ENABLED_DEFAULT = $(CIRCUITPY_USB_HID)
CFLAGS += -DCIRCUITPY_USB_HID_ENABLED_DEFAULT=$(CIRCUITPY_USB_HID_ENABLED_DEFAULT)
# MIDI is usually available if there are at least 8 endpoints.
CIRCUITPY_USB_MIDI ?= $(shell expr $(USB_NUM_EP) '>=' 8)
CIRCUITPY_USB_MIDI ?= $(USB_NUM_EP_8_OR_GREATER)
CFLAGS += -DCIRCUITPY_USB_MIDI=$(CIRCUITPY_USB_MIDI)
CIRCUITPY_USB_MIDI_ENABLED_DEFAULT = $(CIRCUITPY_USB_MIDI)
CFLAGS += -DCIRCUITPY_USB_MIDI_ENABLED_DEFAULT=$(CIRCUITPY_USB_MIDI_ENABLED_DEFAULT)