Press reset then hold boot for self test (#617)

Co-authored-by: Benjamin Wilson <admin@opensourceminer.com>
This commit is contained in:
Benjamin Wilson 2025-01-05 17:08:47 -05:00 committed by GitHub
parent fd11e42ab6
commit 39a4c4164a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}