Commit Graph

4 Commits

Author SHA1 Message Date
Phil Howard 6a3ba0d421 MicroPython: Shim MP_REGISTER_MODULE for >1.18 compat.
MicroPython has changed MP_REGISTER_MODULE to use only *two* args and now runs the preprocessing stage on files before running makemoduledefs.py.

This change avoids the build exploding, since the new regex matches the last two args as a single argument and generates a malformed module defs include.

The pattern here exploits the fact that 1.18 and below do not preprocess files, so *both* MP_REGISTER_MODULE lines are included in the source, but *only* the three arg version is matched by regex.

In >1.18 the files will be processed and the three arg version removed before makemoduledefs.py processes it.
2022-06-14 12:08:47 +01:00
Phil Howard 1feefde00c MicroPython: Promote machine.I2C() to PimoroniI2C.
Create a new PimoroniI2C object internally if a "machine.I2C()" object is supplied in constructors.
2022-05-18 13:20:33 +01:00
Phil Howard 9496d95ec7 Stop & reinit SCD41 to fix lockup for #338 2022-04-11 13:04:49 +01:00
Phil Howard 6d6803612a Add SCD41 MicroPython bindings 2021-12-16 11:39:34 +00:00