diff options
author | Rob Austein <sra@hactrn.net> | 2016-12-21 21:29:28 -0500 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-12-21 21:29:28 -0500 |
commit | 4d0b433281e1189d3d26d6aaf0cdc06705694882 (patch) | |
tree | f0949925a62399c1b23820c1981892bcb2815c4a /projects | |
parent | a86b6d255187a0a6a91916c14b0da49210fbed91 (diff) |
Initialize PINs before trying to use them in bootloader.
Diffstat (limited to 'projects')
-rw-r--r-- | projects/bootloader/dfu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/projects/bootloader/dfu.c b/projects/bootloader/dfu.c index eeaa035..f4a9cf9 100644 --- a/projects/bootloader/dfu.c +++ b/projects/bootloader/dfu.c @@ -38,10 +38,11 @@ #include "stm-led.h" #include "stm-uart.h" #include "stm-flash.h" - #undef HAL_OK + #define HAL_OK LIBHAL_OK #include "hal.h" +#include "hal_internal.h" #undef HAL_OK #include <string.h> @@ -99,6 +100,8 @@ static int do_login(void) uart_flush(); + hal_ks_init_read_only_pins_only(); + if (hal_rpc_login(client, user, pin, n) != LIBHAL_OK) { uart_send_string2(STM_UART_MGMT, "\r\nAccess denied\r\n"); return -1; |