BTW, if you want a simple-to-implement powerful way to get to IO, it’s the LPC equivalent of the stm module. This has 3 real objects - mem8, mem16 and mem32 (I believe they’re actually defined in the machine module) and then a bunch of integer constants for the bases and offsets into the various registers in the device, copied directly from the user manual of the chip. Probably want to call it lpc or nxp instead of stm, though.
Here’s some excerpts from the help for that module, showing a few GPIO values:
The REPL control function processing isn’t there at all - no auto-indent, can’t interrupt running code, etc. Those apparently configure to off by default. My guess would be this needs MICROPY_REPL_EVENT_DRIVEN.
While I can see the memx objects, I can’t test them because I can’t create integer values as big as the addresses of the IO port registers.
>>> GPIO_DIR2 = 0xA0002008
OverflowError: long int not supported in this build
>>> mem32[0xA0002008]
OverflowError: long int not supported in this build
I believe this needs MICROPY_LONGINT_IMPL to (MICROPY_LONGINT_IMPL_LONGLONG).
I forked the source, but doing “make” in the ports/pokitto directory doesn’t work on Linux. Doing “make” in the ports/stm32 directory does. I’ll look into that next time I get some time.
I did find the documentation on the contents of the mpconfigport file: it’s in py/mpconfig.h.
I’d like the uos module in order to look at the flash file system, but that appears to be port specific, not a generic module. And it’s not clear that the flash file system is there yet.
Final question: is there a tutorial showing how to run a python script - preferably using the upygame module - somewhere?
Not all functions of those classes have been implemented and that is not the intention either. The proof of concept is the Mars Attack game, where all those classes have been used.
Maybe I’m wrong but surface.fill() seems not working as expected. Can you confirm it’s implemented?
Do you plan to implements also upygame.draw to manage primitives?
Updated short descriptions to each method in upygame in the post above.
Note: Just noticed that the (audio) mixer functions are missing from Gitlab (however they are there in PokittoLib). I will make a new commit to add it to the GitLab MP repo.