Give fontio its own enable

.. the default is intended to be the equivalent of the original,
implementing `DISPLAYIO && TERMINALIO`.

This is a possible alternative to #6889, if I understand the intent.
This commit is contained in:
Jeff Epler 2022-09-11 08:09:14 -05:00
parent 33a1006111
commit 56112e00a1
3 changed files with 9 additions and 1 deletions

View File

@ -323,6 +323,9 @@ endif
ifeq ($(CIRCUITPY_TERMINALIO),1)
SRC_PATTERNS += terminalio/% fontio/%
endif
ifeq ($(CIRCUITPY_FONTIO),1)
SRC_PATTERNS += fontio/%
endif
ifeq ($(CIRCUITPY_TIME),1)
SRC_PATTERNS += time/%
endif

View File

@ -390,6 +390,11 @@ CFLAGS += -DCIRCUITPY_SYNTHIO=$(CIRCUITPY_SYNTHIO)
CIRCUITPY_TERMINALIO ?= $(CIRCUITPY_DISPLAYIO)
CFLAGS += -DCIRCUITPY_TERMINALIO=$(CIRCUITPY_TERMINALIO)
ifeq ($(CIRCUITPY_DISPLAYIO),1)
CIRCUITPY_FONTIO ?= $(CIRCUITPY_TERMINALIO)
endif
CFLAGS += -DCIRCUITPY_FONTIO=$(CIRCUITPY_FONTIO)
CIRCUITPY_TIME ?= 1
CFLAGS += -DCIRCUITPY_TIME=$(CIRCUITPY_TIME)

View File

@ -57,4 +57,4 @@ const mp_obj_module_t fontio_module = {
.globals = (mp_obj_dict_t *)&fontio_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR_fontio, fontio_module, CIRCUITPY_DISPLAYIO && CIRCUITPY_TERMINALIO);
MP_REGISTER_MODULE(MP_QSTR_fontio, fontio_module, CIRCUITPY_FONTIO);