File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
ledger_secure_sdk_sys/src/c Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,6 @@ use core::ffi::{c_char, c_int};
8
8
use core:: mem:: transmute;
9
9
use ledger_secure_sdk_sys:: * ;
10
10
11
- #[ no_mangle]
12
- static mut G_ux_params : bolos_ux_params_t = unsafe { const_zero ! ( bolos_ux_params_t) } ;
13
-
14
11
pub mod nbgl_address_review;
15
12
pub mod nbgl_choice;
16
13
pub mod nbgl_generic_review;
Original file line number Diff line number Diff line change @@ -266,6 +266,8 @@ void c_reset_bss() {
266
266
memset (bss , 0 , bss_len );
267
267
}
268
268
269
+ bolos_ux_params_t G_ux_params ;
270
+
269
271
void c_boot_std () {
270
272
// below is a 'manual' implementation of `io_seproxyhal_init`
271
273
#ifdef HAVE_MCU_PROTECT
@@ -277,6 +279,19 @@ void c_boot_std() {
277
279
io_seproxyhal_spi_send (c , 4 );
278
280
#endif
279
281
282
+ // Warn UX layer of io reset to avoid unwanted pin lock
283
+ memset (& G_ux_params , 0 , sizeof (G_ux_params ));
284
+ G_ux_params .ux_id = BOLOS_UX_IO_RESET ;
285
+
286
+ // If the app has just been booted from the UX, multiple os_ux calls may be necessary
287
+ // to ensure UX layer has take the BOLOS_UX_IO_RESET instruction into account.
288
+ for (uint8_t i = 0 ; i < 2 ; i ++ ) {
289
+ os_ux (& G_ux_params );
290
+ if (os_sched_last_status (TASK_BOLOS_UX ) == BOLOS_UX_OK ) {
291
+ break ;
292
+ }
293
+ }
294
+
280
295
#ifdef HAVE_BLE
281
296
unsigned int plane = G_io_app .plane_mode ;
282
297
#endif
You can’t perform that action at this time.
0 commit comments