diff --git a/core/embed/rust/src/ui/api/firmware_micropython.rs b/core/embed/rust/src/ui/api/firmware_micropython.rs index 0f1a3b901b..f472aab533 100644 --- a/core/embed/rust/src/ui/api/firmware_micropython.rs +++ b/core/embed/rust/src/ui/api/firmware_micropython.rs @@ -1062,15 +1062,16 @@ pub static mp_module_trezorui_api: Module = obj_module! { /// def button_event(self, event: int, button: int) -> LayoutState | None: /// """Receive a button event `event` for button `button`.""" /// + /// if utils.USE_BLE: + /// def ble_event(self, event: int, data: bytes) -> LayoutState | None: + /// """Receive a BLE events.""" + /// /// def progress_event(self, value: int, description: str) -> LayoutState | None: /// """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, int | None]) -> LayoutState | None: - /// """Receive a BLE event.""" - /// /// def timer(self, token: int) -> LayoutState | None: /// """Callback for the timer set by `attach_timer_fn`. /// diff --git a/core/mocks/generated/trezorui_api.pyi b/core/mocks/generated/trezorui_api.pyi index a70518b4b0..5744772ca5 100644 --- a/core/mocks/generated/trezorui_api.pyi +++ b/core/mocks/generated/trezorui_api.pyi @@ -22,12 +22,13 @@ class LayoutObj(Generic[T]): if utils.USE_BUTTON: def button_event(self, event: int, button: int) -> LayoutState | None: """Receive a button event `event` for button `button`.""" + if utils.USE_BLE: + def ble_event(self, event: int, data: bytes) -> LayoutState | None: + """Receive a BLE events.""" def progress_event(self, value: int, description: str) -> LayoutState | None: """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, int | None]) -> 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