X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstmf0%2Fao_boot_pin.c;h=f21ce1b251ff5931d5609ebb1926b6d2d68966ed;hp=4b5dc2ac480341086e4264284b9345d2e5da299c;hb=ffbf340c516a7fff7c95b808586f623269fe4338;hpb=ee009332a17557076f4c9348a31658f5bf605240 diff --git a/src/stmf0/ao_boot_pin.c b/src/stmf0/ao_boot_pin.c index 4b5dc2ac..f21ce1b2 100644 --- a/src/stmf0/ao_boot_pin.c +++ b/src/stmf0/ao_boot_pin.c @@ -20,7 +20,7 @@ #include #include -void +int ao_boot_check_pin(void) { uint16_t v; @@ -42,6 +42,5 @@ ao_boot_check_pin(void) ao_gpio_set_mode(&AO_BOOT_APPLICATION_GPIO, AO_BOOT_APPLICATION_PIN, 0); ao_disable_port(&AO_BOOT_APPLICATION_GPIO); stm_rcc.apb1enr &= ~(1 << STM_RCC_APB1ENR_PWREN); - if (v == AO_BOOT_APPLICATION_VALUE) - ao_boot_chain(AO_BOOT_APPLICATION_BASE); + return v == AO_BOOT_APPLICATION_VALUE; }