Skip to content

Commit

Permalink
Merge pull request #2581 from jamesbowman/master
Browse files Browse the repository at this point in the history
First draft of eveL, the low-level module of the Gameduino bindings
  • Loading branch information
tannewt authored Feb 13, 2020
2 parents a076020 + b02937d commit e97b0cf
Show file tree
Hide file tree
Showing 9 changed files with 1,566 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 3
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"
LONGINT_IMPL = MPZ

CIRCUITPY__EVE = 1
2 changes: 2 additions & 0 deletions ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ MCU_CHIP = nrf52840
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "GD25Q16C"

CIRCUITPY__EVE = 1
7 changes: 6 additions & 1 deletion py/circuitpy_defns.mk
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ endif
ifeq ($(CIRCUITPY_MATH),1)
SRC_PATTERNS += math/%
endif
ifeq ($(CIRCUITPY__EVE),1)
SRC_PATTERNS += _eve/%
endif
ifeq ($(CIRCUITPY_MICROCONTROLLER),1)
SRC_PATTERNS += microcontroller/%
endif
Expand Down Expand Up @@ -298,6 +301,7 @@ $(filter $(SRC_PATTERNS), \
fontio/Glyph.c \
microcontroller/RunMode.c \
math/__init__.c \
_eve/__init__.c \
)

SRC_BINDINGS_ENUMS += \
Expand Down Expand Up @@ -359,7 +363,8 @@ SRC_SHARED_MODULE_ALL = \
uheap/__init__.c \
ustack/__init__.c \
_pew/__init__.c \
_pew/PewPew.c
_pew/PewPew.c \
_eve/__init__.c

# All possible sources are listed here, and are filtered by SRC_PATTERNS.
SRC_SHARED_MODULE = $(filter $(SRC_PATTERNS), $(SRC_SHARED_MODULE_ALL))
Expand Down
8 changes: 8 additions & 0 deletions py/circuitpy_mpconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,13 @@ extern const struct _mp_obj_module_t math_module;
#define MATH_MODULE
#endif

#if CIRCUITPY__EVE
extern const struct _mp_obj_module_t _eve_module;
#define _EVE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__eve), (mp_obj_t)&_eve_module },
#else
#define _EVE_MODULE
#endif

#if CIRCUITPY_MICROCONTROLLER
extern const struct _mp_obj_module_t microcontroller_module;
#define MICROCONTROLLER_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_microcontroller), (mp_obj_t)&microcontroller_module },
Expand Down Expand Up @@ -617,6 +624,7 @@ extern const struct _mp_obj_module_t ustack_module;
I2CSLAVE_MODULE \
JSON_MODULE \
MATH_MODULE \
_EVE_MODULE \
MICROCONTROLLER_MODULE \
NEOPIXEL_WRITE_MODULE \
NETWORK_MODULE \
Expand Down
5 changes: 5 additions & 0 deletions py/circuitpy_mpconfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ CIRCUITPY_MATH = $(CIRCUITPY_ALWAYS_BUILD)
endif
CFLAGS += -DCIRCUITPY_MATH=$(CIRCUITPY_MATH)

ifndef CIRCUITPY__EVE
CIRCUITPY__EVE = 0
endif
CFLAGS += -DCIRCUITPY__EVE=$(CIRCUITPY__EVE)

ifndef CIRCUITPY_MICROCONTROLLER
CIRCUITPY_MICROCONTROLLER = $(CIRCUITPY_DEFAULT_BUILD)
endif
Expand Down
Loading

0 comments on commit e97b0cf

Please sign in to comment.