BLE handling for all BLE-enabled devices

This commit is contained in:
Alexandre Paillier
2023-05-16 18:22:44 +02:00
parent 5f7cc79f16
commit 52e6c29aae
2 changed files with 5 additions and 7 deletions

View File

@@ -78,13 +78,11 @@ void handle_swap_sign_transaction(chain_config_t* config) {
USB_power(1);
// ui_idle();
PRINTF("USB power ON/OFF\n");
#ifdef TARGET_NANOX
#ifdef HAVE_BLE
// grab the current plane mode setting
G_io_app.plane_mode = os_setting_get(OS_SETTING_PLANEMODE, NULL, 0);
#endif // TARGET_NANOX
#ifdef HAVE_BLE
BLE_power(0, NULL);
BLE_power(1, "Nano X");
BLE_power(1, NULL);
#endif // HAVE_BLE
app_main();
}

View File

@@ -989,10 +989,10 @@ void coin_main(libargs_t *args) {
TRY {
io_seproxyhal_init();
#ifdef TARGET_NANOX
#ifdef HAVE_BLE
// grab the current plane mode setting
G_io_app.plane_mode = os_setting_get(OS_SETTING_PLANEMODE, NULL, 0);
#endif // TARGET_NANOX
#endif // HAVE_BLE
if (!N_storage.initialized) {
internalStorage_t storage;
@@ -1020,7 +1020,7 @@ void coin_main(libargs_t *args) {
#ifdef HAVE_BLE
BLE_power(0, NULL);
BLE_power(1, "Nano X");
BLE_power(1, NULL);
#endif // HAVE_BLE
#ifdef HAVE_DOMAIN_NAME