Open
Conversation
tannewt
requested changes
Apr 9, 2026
Member
tannewt
left a comment
There was a problem hiding this comment.
Two small things. Thanks for the PR!
Comment on lines
+126
to
+128
| // 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 }, |
Author
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.
Comment on lines
+13
to
+28
| // LUT manipulation | ||
| static const mp_rom_map_elem_t lut_update_table[] = { | ||
| { MP_ROM_QSTR(MP_QSTR_SET_UPDATE_SPEED), (mp_obj_t)&set_update_speed_obj }, | ||
| { MP_ROM_QSTR(MP_QSTR_SPEED_SLOW), MP_ROM_INT(0) }, | ||
| { MP_ROM_QSTR(MP_QSTR_SPEED_FAST), MP_ROM_INT(1) }, | ||
| { MP_ROM_QSTR(MP_QSTR_SPEED_FASTER), MP_ROM_INT(2) }, | ||
| { MP_ROM_QSTR(MP_QSTR_SPEED_FASTEST), MP_ROM_INT(3) }, | ||
| }; | ||
| MP_DEFINE_CONST_DICT(lut_update_dict, lut_update_table); | ||
|
|
||
| MP_DEFINE_CONST_OBJ_TYPE( | ||
| display_type, | ||
| MP_QSTR_display, | ||
| MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS | ~MP_TYPE_FLAG_BINDS_SELF, | ||
| locals_dict, &lut_update_dict | ||
| ); |
Member
There was a problem hiding this comment.
Could you look into making this a module type like microcontroller.pins? I think it'd be confusing with a type of "display".
Author
There was a problem hiding this comment.
I actually followed your suggestions from #10800, see #10800 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Board definition for Pimoroni Badger2350