Skip to content

Commit 5b2e839

Browse files
committed
added documentation
1 parent 2b6945a commit 5b2e839

File tree

1 file changed

+6
-0
lines changed
  • ports/raspberrypi/boards/pimoroni_badger2350

1 file changed

+6
-0
lines changed

ports/raspberrypi/boards/pimoroni_badger2350/pins.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ static const mp_rom_map_elem_t board_module_globals_table[] = {
122122
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].epaper_display)},
123123

124124
// button-state on reset
125+
// Use `board.RESET_STATE()` to query the state of all buttons at reset.
126+
// To detect individual key-presses, `board.ON_RESET_PRESSED()`
127+
// is simpler.
125128
{ MP_ROM_QSTR(MP_QSTR_RESET_STATE), (mp_obj_t)&get_reset_state_obj },
129+
130+
// Use `board.ON_RESET_PRESSED(board.SW_A)` to check if `SW_A` was pressed
131+
// during reset.
126132
{ MP_ROM_QSTR(MP_QSTR_ON_RESET_PRESSED), (mp_obj_t)&on_reset_pressed_obj },
127133

128134
};

0 commit comments

Comments
 (0)