1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-24 03:55:44 +00:00

fix(core): add LayoutObj.ble_event mock

[no changelog]
This commit is contained in:
Roman Zeyde 2025-03-19 14:21:47 +02:00 committed by Roman Zeyde
parent fabb5e8c6c
commit 9926df6ab5
2 changed files with 5 additions and 0 deletions
core
embed/rust/src/ui/api
mocks/generated

View File

@ -1068,6 +1068,9 @@ pub static mp_module_trezorui_api: Module = obj_module! {
/// def usb_event(self, connected: bool) -> LayoutState | None:
/// """Receive a USB connect/disconnect event."""
///
/// def ble_event(self, event: tuple[int, bytes]) -> LayoutState | None:
/// """Receive a BLE event."""
///
/// def timer(self, token: int) -> LayoutState | None:
/// """Callback for the timer set by `attach_timer_fn`.
///

View File

@ -26,6 +26,8 @@ class LayoutObj(Generic[T]):
"""Receive a progress event."""
def usb_event(self, connected: bool) -> LayoutState | None:
"""Receive a USB connect/disconnect event."""
def ble_event(self, event: tuple[int, bytes]) -> LayoutState | None:
"""Receive a BLE event."""
def timer(self, token: int) -> LayoutState | None:
"""Callback for the timer set by `attach_timer_fn`.
This function should be called by the executor after the corresponding