Skip to content

Commit

Permalink
Press reset then hold boot for self test (#617)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Wilson <admin@opensourceminer.com>
  • Loading branch information
benjamin-wilson and Benjamin Wilson authored Jan 5, 2025
1 parent fd11e42 commit 39a4c41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ void app_main(void)
return;
}

// Optionally hold the boot button
bool pressed = gpio_get_level(CONFIG_GPIO_BUTTON_BOOT) == 0; // LOW when pressed
//should we run the self test?
if (should_test(&GLOBAL_STATE)) {
if (should_test(&GLOBAL_STATE) || pressed) {
self_test((void *) &GLOBAL_STATE);
return;
}
Expand Down

0 comments on commit 39a4c41

Please sign in to comment.