Skip to content

Commit

Permalink
Merge pull request #494 from LedgerHQ/abo_make_io_reset_public
Browse files Browse the repository at this point in the history
Avoid unwanted pin lock during io reset
  • Loading branch information
abonnaudet-ledger authored Dec 13, 2023
2 parents b2565ee + d337002 commit a01a99c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/os_ux.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ typedef enum bolos_ux_e {
BOLOS_UX_ASYNCHMODAL_PAIRING_REQUEST, // ask the ux to display a modal to accept/reject the
// current pairing request
BOLOS_UX_ASYNCHMODAL_PAIRING_CANCEL,
BOLOS_UX_IO_RESET,
BOLOS_UX_LAST_ID,
} bolos_ux_t;

Expand Down
7 changes: 7 additions & 0 deletions src/os_io_seproxyhal.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,13 @@ void io_seproxyhal_init(void)
app_stack_canary = APP_STACK_CANARY_MAGIC;
#endif // HAVE_BOLOS_APP_STACK_CANARY

#if !defined(HAVE_BOLOS) && !defined(BOLOS_OS_UPGRADER_APP)
// Warn UX layer of io reset to avoid unwanted pin lock
memset(&G_ux_params, 0, sizeof(G_ux_params));
G_ux_params.ux_id = BOLOS_UX_IO_RESET;
os_ux(&G_ux_params);
#endif

// wipe the io structure before it's used
#ifdef HAVE_BLE
unsigned int plane = G_io_app.plane_mode;
Expand Down

0 comments on commit a01a99c

Please sign in to comment.