From 0cdbc004e6b8c29c06b53b648599ca190b881d2a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 22 Jan 2019 17:59:31 -0800 Subject: [PATCH 1/2] Enable displayio on all Express boards. --- ports/atmel-samd/mpconfigport.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index e9507e3cc97c0..c5b64b026072d 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -283,13 +283,9 @@ extern const struct _mp_obj_module_t pixelbuf_module; #define I2CSLAVE_MODULE #endif - #ifdef CIRCUITPY_DISPLAYIO + #define CIRCUITPY_DISPLAYIO (1) #define CIRCUITPY_DISPLAY_LIMIT (3) #define DISPLAYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_displayio), (mp_obj_t)&displayio_module }, - #else - #define CIRCUITPY_DISPLAY_LIMIT (0) - #define DISPLAYIO_MODULE - #endif #if MICROPY_PY_NETWORK #define NETWORK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_network), (mp_obj_t)&network_module }, From aaa644b223bcf86db6af14416916ea74311f7903 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 22 Jan 2019 18:49:37 -0800 Subject: [PATCH 2/2] Skip displayio on crickit builds and cpx build due to lack of space. --- .../boards/circuitplayground_express/mpconfigboard.h | 2 ++ .../circuitplayground_express_crickit/mpconfigboard.h | 2 ++ .../boards/feather_m0_express_crickit/mpconfigboard.h | 2 ++ ports/atmel-samd/mpconfigport.h | 6 ++++++ 4 files changed, 12 insertions(+) diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h index e6a7e06769a20..6d926778e9362 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h @@ -46,3 +46,5 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +#define CIRCUITPY_DISPLAYIO (0) diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h index e66d9c40e8fa0..5c3be69dd6f00 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -49,3 +49,5 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +#define CIRCUITPY_DISPLAYIO (0) diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h index abbf0b08c9070..4a5004b3a92fd 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.h @@ -32,3 +32,5 @@ #define DEFAULT_UART_BUS_RX (&pin_PA11) #define DEFAULT_UART_BUS_TX (&pin_PA10) + +#define CIRCUITPY_DISPLAYIO (0) diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index c5b64b026072d..da3383f8e9806 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -283,9 +283,15 @@ extern const struct _mp_obj_module_t pixelbuf_module; #define I2CSLAVE_MODULE #endif + #if !defined(CIRCUITPY_DISPLAYIO) || CIRCUITPY_DISPLAYIO #define CIRCUITPY_DISPLAYIO (1) #define CIRCUITPY_DISPLAY_LIMIT (3) #define DISPLAYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_displayio), (mp_obj_t)&displayio_module }, + #else + #define CIRCUITPY_DISPLAYIO (0) + #define CIRCUITPY_DISPLAY_LIMIT (0) + #define DISPLAYIO_MODULE + #endif #if MICROPY_PY_NETWORK #define NETWORK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_network), (mp_obj_t)&network_module },