This saves 444 bytes on the pygamer build (both commits taken together)
testing performed:
* pygamer (samd51) with ShiftRegisterKeys
* macropad (rp2040) with Keys
* UM feather s2 (esp32-s2) with KeyMatrix
Result:
* all ports still worked nicely
* keys held down at start always registered (>2 trials all boards, >100 trials esp32-s2)
* keys held down are immediately registered after reset() (>100 trials esp32-s2)
* double .reset() is OK, accessing .events throws (only tested esp32-s2)
This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.
There are a couple other cleanups that were incidental:
* Use const mcu_pin_obj_t instead of omitting the const. The structs
themselves are const because they are in ROM.
* Use PTR <-> OBJ conversions in more places. They were found when
mp_obj_t was set to an integer type rather than pointer.
* Optimize submodule checkout because the Pi submodules are heavy
and unnecessary for the vast majority of builds.
Fixes#4314