Tweak A1S to make it work with devkit + correct one minor bug in buttons - release

This commit is contained in:
philippe44
2020-03-09 19:45:44 -07:00
parent 6398bbfe9f
commit bbe42f68a3
4 changed files with 32 additions and 27 deletions

View File

@@ -116,7 +116,8 @@ static void jack_handler_default(void *id, button_event_e event, button_press_e
*
*/
bool jack_inserted_svc (void) {
return button_is_pressed(jack.gpio, NULL);
if (jack.gpio != -1) return button_is_pressed(jack.gpio, NULL);
else return true;
}
/****************************************************************************************