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.
* Use a single common function prototype for all (but two) commands
* Remove "last param" from every param, in favour of an "end_cmd"
* Rename "send_cmd" to "start_cmd" to better reflect what it does
* Replace hard-coded param counts with macro (sizeof(params) / sizeof(inParam))
* Eliminate common causes of bugs
* Try to document some functions
* Correct some types (wl_enc_type, peek as bool)
* Handle timeouts & sleep states
* Successful command exits sleep
This change appends the list dir and project root dir to CMAKE_MODULE_PATH so that it doesn't need prepended to each "include" directive.
All .mk files have been deleted, since these are completely redundant.
This change removes file-relative include paths and adds the project root as a global include path.
* Project root added to CMakeLists.txt so that all targets can find includes
* Project root added micropython.cmake so that targets used by the MicroPython build can find includes
Note: pico-boilerplate projects must set this include path
Passing interchangably as int/bytes was weird, and due to Python's signedness on int resulted in a heck of a bug-hunt.
I've switched IP address to converting from/to a tuple internally, so Python code doesn't have to be weird.
Uses an arbitrarily sized, dynamically alloc'd buffer. This should *probably* do the legwork to get the whole buffer and give it to Python without needing multiple calls.