From c2b23c565d4c68ad2f23791316bbdef453ddcdad Mon Sep 17 00:00:00 2001 From: schneider <schneider@blinkenlichts.net> Date: Mon, 6 May 2019 11:20:20 +0200 Subject: [PATCH] fix(bootlader): Use push button subsystem --- bootloader/main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bootloader/main.c b/bootloader/main.c index f21c9d1a..2b59180a 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -178,16 +178,9 @@ int main(void) { printf("\n\nBootloader\n"); - - gpio_cfg_t gpio_in; - gpio_in.port = GPIO_PORT_IN; - gpio_in.mask = GPIO_PIN_IN; - gpio_in.pad = GPIO_PAD_PULL_UP; - gpio_in.func = GPIO_FUNC_IN; - GPIO_Config(&gpio_in); - // If the button is pressed, we go into MSC mode. - if (!GPIO_InGet(&gpio_in)) { + //if (!GPIO_InGet(&gpio_in)) { + if (PB_Get(0)) { run_usbmsc(); // If we return, don't try to boot. Maybe rather trigger a software reset. -- GitLab