Skip to content

Add support for Pimoroni Badger2350#10929

Open
bablokb wants to merge 3 commits intoadafruit:mainfrom
bablokb:badger2350
Open

Add support for Pimoroni Badger2350#10929
bablokb wants to merge 3 commits intoadafruit:mainfrom
bablokb:badger2350

Conversation

@bablokb
Copy link
Copy Markdown

@bablokb bablokb commented Apr 9, 2026

Board definition for Pimoroni Badger2350

Copy link
Copy Markdown
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this stuff for?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you look into making this a module type like microcontroller.pins? I think it'd be confusing with a type of "display".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually followed your suggestions from #10800, see #10800 (comment)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it, see commit below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants