From 6aaab005c5f3a781fec229640c74bf44a601fc97 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 17 Apr 2020 16:23:28 -0700 Subject: Initial ESP32S2 port. Basic blinky works but doesn't check pins. --- py/circuitpy_mpconfig.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'py') diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 6ea413216..3e5affda9 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -216,6 +216,10 @@ typedef long mp_off_t; #define MP_SSIZE_MAX (0x7fffffff) #endif +#ifndef MICROPY_PY_REVERSE_SPECIAL_METHODS +#define MICROPY_PY_REVERSE_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD) +#endif + #if INTERNAL_FLASH_FILESYSTEM == 0 && QSPI_FLASH_FILESYSTEM == 0 && SPI_FLASH_FILESYSTEM == 0 && !DISABLE_FILESYSTEM #error No *_FLASH_FILESYSTEM set! #endif @@ -610,6 +614,10 @@ extern const struct _mp_obj_module_t ustack_module; #endif #if defined(CIRCUITPY_ULAB) && CIRCUITPY_ULAB +// ulab requires reverse special methods +#if defined(MICROPY_PY_REVERSE_SPECIAL_METHODS) && !MICROPY_PY_REVERSE_SPECIAL_METHODS +#error "ulab requires MICROPY_PY_REVERSE_SPECIAL_METHODS" +#endif #define ULAB_MODULE \ { MP_ROM_QSTR(MP_QSTR_ulab), MP_ROM_PTR(&ulab_user_cmodule) }, #else -- cgit v1.2.3 From acf4b1bedeabe18a7b4b969e7156217ae6bde10a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 19 May 2020 11:43:57 -0700 Subject: Remove reverse methods from per-board defs --- .../atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h | 2 -- ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h | 2 -- ports/atmel-samd/mpconfigport.h | 1 + py/circuitpy_mpconfig.h | 1 + 4 files changed, 2 insertions(+), 4 deletions(-) (limited to 'py') diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h index 17204a31a..312fd2626 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -32,8 +32,6 @@ // Increase stack size slightly due to CPX library import nesting #define CIRCUITPY_DEFAULT_STACK_SIZE (4760) // divisible by 8 -#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0) - #define DEFAULT_I2C_BUS_SCL (&pin_PB03) #define DEFAULT_I2C_BUS_SDA (&pin_PB02) diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h index 182c6fa05..af473b128 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.h @@ -18,8 +18,6 @@ #define CALIBRATE_CRYSTALLESS 1 -#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0) - #define DEFAULT_I2C_BUS_SCL (&pin_PA09) #define DEFAULT_I2C_BUS_SDA (&pin_PA08) diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index 63e92c967..1aa305cd3 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -47,6 +47,7 @@ #define MICROPY_PY_FUNCTION_ATTRS (0) // MICROPY_PY_UJSON depends on MICROPY_PY_IO #define MICROPY_PY_IO (0) +#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0) #define MICROPY_PY_UJSON (0) #define MICROPY_PY_UERRNO_LIST \ X(EPERM) \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 3e5affda9..5f2605c92 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -623,6 +623,7 @@ extern const struct _mp_obj_module_t ustack_module; #else #define ULAB_MODULE #endif + #if MICROPY_PY_URE #define RE_MODULE { MP_ROM_QSTR(MP_QSTR_re), MP_ROM_PTR(&mp_module_ure) }, #else -- cgit v1.2.3