diff --git a/extmod/ulab b/extmod/ulab index 0c7c6b88f3..5d01882c41 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit 0c7c6b88f3ec1b1d11d2f7d8b185e28ac657c06d +Subproject commit 5d01882c41dbc4115bc94f0b61c093d5a6b812b6 diff --git a/py/py.mk b/py/py.mk index 9e2e522cf0..13765dee80 100644 --- a/py/py.mk +++ b/py/py.mk @@ -55,7 +55,7 @@ endif ifeq ($(CIRCUITPY_ULAB),1) ULAB_SRCS := $(shell find $(TOP)/extmod/ulab/code -type f -name "*.c") SRC_MOD += $(patsubst $(TOP)/%,%,$(ULAB_SRCS)) -CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -iquote $(TOP)/extmod/ulab/code +CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -DULAB_HAS_USER_MODULE=0 -iquote $(TOP)/extmod/ulab/code $(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY endif diff --git a/shared-bindings/adafruit_bus_device/__init__.c b/shared-bindings/adafruit_bus_device/__init__.c index 742cfc3480..be2378b154 100644 --- a/shared-bindings/adafruit_bus_device/__init__.c +++ b/shared-bindings/adafruit_bus_device/__init__.c @@ -78,3 +78,5 @@ const mp_obj_module_t adafruit_bus_device_module = { }; MP_REGISTER_MODULE(MP_QSTR_adafruit_bus_device, adafruit_bus_device_module, CIRCUITPY_BUSDEVICE); +MP_REGISTER_MODULE(MP_QSTR_adafruit_bus_device_dot_i2c_device, adafruit_bus_device_i2c_device_module, CIRCUITPY_BUSDEVICE); +MP_REGISTER_MODULE(MP_QSTR_adafruit_bus_device_dot_spi_device, adafruit_bus_device_spi_device_module, CIRCUITPY_BUSDEVICE); diff --git a/tests/circuitpython/builtin_submodule.py b/tests/circuitpython/builtin_submodule.py new file mode 100644 index 0000000000..6d266f69b1 --- /dev/null +++ b/tests/circuitpython/builtin_submodule.py @@ -0,0 +1,9 @@ +try: + import ulab +except: + print("SKIP") + raise SystemExit(0) + +import ulab.scipy.linalg + +print(ulab.scipy.linalg) diff --git a/tests/circuitpython/builtin_submodule.py.exp b/tests/circuitpython/builtin_submodule.py.exp new file mode 100644 index 0000000000..6bfad9e9ad --- /dev/null +++ b/tests/circuitpython/builtin_submodule.py.exp @@ -0,0 +1 @@ + diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index d3a2f651ee..888da9814b 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -37,9 +37,12 @@ gc gifio hashlib json math qrio rainbowio re sys termios traceback ubinascii uctypes uerrno uheapq uio -ujson ulab uos urandom -ure uselect ustruct utime -utimeq uzlib +ujson ulab ulab.fft ulab.linalg +ulab.numpy ulab.scipy ulab.scipy.linalg +ulab.scipy.optimize ulab.scipy.signal +ulab.scipy.special ulab.utils uos +urandom ure uselect ustruct +utime utimeq uzlib ime utime utimeq