chore(core): rename `BleInterface` to `BLEIF`
What changed, and why it matters
This commit is a simple rename of a Bluetooth interface class from 'BleInterface' to 'BLEIF' to match the naming style of 'USBIF'. It only changes names in code comments, type stubs, and internal identifiers. No behavior changes, no security fixes, and no security risks are present.
No action required; this is a non-security refactoring change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit renames the MicroPython/Rust BLE interface type symbol from BleInterface to BLEIF across generated qstr headers, Rust micropython bindings, C module comments, and Python mock stubs. It is a purely cosmetic refactoring with no functional or security-relevant code changes.
Changed components
core/embed/rust/librust_qstr.hcore/embed/rust/src/trezorhal/ble/micropython.rscore/embed/upymod/modtrezorio/modtrezorio.ccore/mocks/generated/trezorble.pyicore/mocks/generated/trezorio/__init__.pyiInspect captured patch +8 / −8
diff --git a/core/embed/rust/librust_qstr.h b/core/embed/rust/librust_qstr.h
index 0fd3c2b02..a84d27f98 100644
--- a/core/embed/rust/librust_qstr.h
+++ b/core/embed/rust/librust_qstr.h
@@ -20,9 +20,9 @@ static void _librust_qstrs(void) {
MP_QSTR_AttachType;
MP_QSTR_AutoLockDelay;
MP_QSTR_BACK;
+ MP_QSTR_BLEIF;
MP_QSTR_BacklightLevels;
MP_QSTR_BackupFailed;
- MP_QSTR_BleInterface;
MP_QSTR_Bluetooth;
MP_QSTR_CANCELLED;
MP_QSTR_CONFIRMED;
diff --git a/core/embed/rust/src/trezorhal/ble/micropython.rs b/core/embed/rust/src/trezorhal/ble/micropython.rs
index fc4af7543..6e5c10ddb 100644
--- a/core/embed/rust/src/trezorhal/ble/micropython.rs
+++ b/core/embed/rust/src/trezorhal/ble/micropython.rs
@@ -212,7 +212,7 @@ extern "C" fn py_iface_read(n_args: usize, args: *const Obj) -> Obj {
}
static BLE_INTERFACE_TYPE: Type = obj_type! {
- name: Qstr::MP_QSTR_BleInterface,
+ name: Qstr::MP_QSTR_BLEIF,
locals: &obj_dict!(obj_map! {
Qstr::MP_QSTR_iface_num => obj_fn_1!(py_iface_num).as_obj(),
Qstr::MP_QSTR_write => obj_fn_2!(py_iface_write).as_obj(),
@@ -229,7 +229,7 @@ static BLE_INTERFACE_OBJ: SimpleTypeObj = SimpleTypeObj::new(&BLE_INTERFACE_TYPE
pub static mp_module_trezorble: Module = obj_module! {
Qstr::MP_QSTR___name__ => Qstr::MP_QSTR_trezorble.to_obj(),
- /// class BleInterface:
+ /// class BLEIF:
/// """
/// BLE interface wrapper.
/// """
@@ -257,7 +257,7 @@ pub static mp_module_trezorble: Module = obj_module! {
///
/// mock:global
///
- /// interface: BleInterface
+ /// interface: BLEIF
/// """BLE interface instance."""
Qstr::MP_QSTR_interface => BLE_INTERFACE_OBJ.as_obj(),
diff --git a/core/embed/upymod/modtrezorio/modtrezorio.c b/core/embed/upymod/modtrezorio/modtrezorio.c
index 48435ec28..9f605f14f 100644
--- a/core/embed/upymod/modtrezorio/modtrezorio.c
+++ b/core/embed/upymod/modtrezorio/modtrezorio.c
@@ -88,7 +88,7 @@ uint32_t last_touch_sample_time = 0;
/// USB_EVENT: int # interface id for USB events
-/// WireInterface = Union[USBIF, BleInterface]
+/// WireInterface = Union[USBIF, BLEIF]
/// USBIF_WIRE: int # interface id of the USB wire interface
/// USBIF_DEBUG: int # interface id of the USB debug interface
/// USBIF_WEBAUTHN: int # interface id of the USB WebAuthn
diff --git a/core/mocks/generated/trezorble.pyi b/core/mocks/generated/trezorble.pyi
index ad0491da0..74044cf3b 100644
--- a/core/mocks/generated/trezorble.pyi
+++ b/core/mocks/generated/trezorble.pyi
@@ -2,7 +2,7 @@ from typing import *
# rust/src/trezorhal/ble/micropython.rs
-class BleInterface:
+class BLEIF:
"""
BLE interface wrapper.
"""
@@ -25,7 +25,7 @@ class BleInterface:
"""
Reads message using BLE (device).
"""
-interface: BleInterface
+interface: BLEIF
"""BLE interface instance."""
diff --git a/core/mocks/generated/trezorio/__init__.pyi b/core/mocks/generated/trezorio/__init__.pyi
index 6b54e6100..b14c2ee77 100644
--- a/core/mocks/generated/trezorio/__init__.pyi
+++ b/core/mocks/generated/trezorio/__init__.pyi
@@ -97,7 +97,7 @@ BUTTON_RELEASED: int # button up event
BUTTON_LEFT: int # button number of left button
BUTTON_RIGHT: int # button number of right button
USB_EVENT: int # interface id for USB events
-WireInterface = Union[USBIF, BleInterface]
+WireInterface = Union[USBIF, BLEIF]
USBIF_WIRE: int # interface id of the USB wire interface
USBIF_DEBUG: int # interface id of the USB debug interface
USBIF_WEBAUTHN: int # interface id of the USB WebAuthn
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.