Conversation
tannewt
left a comment
There was a problem hiding this comment.
Two small things. Thanks for the PR!
| // button-state on reset | ||
| { MP_ROM_QSTR(MP_QSTR_RESET_STATE), (mp_obj_t)&get_reset_state_obj }, | ||
| { MP_ROM_QSTR(MP_QSTR_ON_RESET_PRESSED), (mp_obj_t)&on_reset_pressed_obj }, |
There was a problem hiding this comment.
This is to capture button state before CircuitPython takes over. Instead of having to press a button for several seconds until user-space takes over, this is basically instantaneous. These two methods allow to query the state once user-space takes over.
There was a problem hiding this comment.
Please document these somewhere so folks can find how to use them.
There was a problem hiding this comment.
Any suggestions? I don't see any board specific documentation within the CircuitPython source tree for other boards yet so I don't feel this is a requirement. And I doubt casual users will look into such an obscure place as the source tree anyhow.
But I actually wonder why. There are so many very specialized boards supported by CP, and for all of those non-mainstream boards you just have to look up the exact information (e.g. schematic, source) if you want to make full use.
Board definition for Pimoroni Badger2350