From 1c09490f3bca1b070b90cde8883c9a8f613dc884 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Fri, 11 Apr 2025 02:10:51 +0200 Subject: [PATCH] refactor(core/io): add pairing_code to ble_command_data_t [no changelog] --- core/embed/io/ble/inc/io/ble.h | 1 + core/embed/io/ble/stm32/ble.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/embed/io/ble/inc/io/ble.h b/core/embed/io/ble/inc/io/ble.h index 17867055e7..6879375417 100644 --- a/core/embed/io/ble/inc/io/ble.h +++ b/core/embed/io/ble/inc/io/ble.h @@ -50,6 +50,7 @@ typedef struct { typedef union { uint8_t raw[32]; ble_adv_start_cmd_data_t adv_start; + uint8_t pairing_code[BLE_PAIRING_CODE_LEN]; } ble_command_data_t; typedef struct { diff --git a/core/embed/io/ble/stm32/ble.c b/core/embed/io/ble/stm32/ble.c index d39f29e6b9..d13938aa19 100644 --- a/core/embed/io/ble/stm32/ble.c +++ b/core/embed/io/ble/stm32/ble.c @@ -595,7 +595,7 @@ bool ble_issue_command(ble_command_t *command) { result = ble_send_erase_bonds(drv); break; case BLE_ALLOW_PAIRING: - result = ble_send_pairing_accept(drv, command->data.raw); + result = ble_send_pairing_accept(drv, command->data.pairing_code); break; case BLE_REJECT_PAIRING: result = ble_send_pairing_reject(drv);