mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-26 09:52:34 +00:00
fix(core): make ble_event upy api function optional
[no changelog]
This commit is contained in:
parent
4adf6d087d
commit
1fc6feda80
@ -1062,15 +1062,16 @@ pub static mp_module_trezorui_api: Module = obj_module! {
|
|||||||
/// def button_event(self, event: int, button: int) -> LayoutState | None:
|
/// def button_event(self, event: int, button: int) -> LayoutState | None:
|
||||||
/// """Receive a button event `event` for button `button`."""
|
/// """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:
|
/// def progress_event(self, value: int, description: str) -> LayoutState | None:
|
||||||
/// """Receive a progress event."""
|
/// """Receive a progress event."""
|
||||||
///
|
///
|
||||||
/// def usb_event(self, connected: bool) -> LayoutState | None:
|
/// def usb_event(self, connected: bool) -> LayoutState | None:
|
||||||
/// """Receive a USB connect/disconnect event."""
|
/// """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:
|
/// def timer(self, token: int) -> LayoutState | None:
|
||||||
/// """Callback for the timer set by `attach_timer_fn`.
|
/// """Callback for the timer set by `attach_timer_fn`.
|
||||||
///
|
///
|
||||||
|
@ -22,12 +22,13 @@ class LayoutObj(Generic[T]):
|
|||||||
if utils.USE_BUTTON:
|
if utils.USE_BUTTON:
|
||||||
def button_event(self, event: int, button: int) -> LayoutState | None:
|
def button_event(self, event: int, button: int) -> LayoutState | None:
|
||||||
"""Receive a button event `event` for button `button`."""
|
"""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:
|
def progress_event(self, value: int, description: str) -> LayoutState | None:
|
||||||
"""Receive a progress event."""
|
"""Receive a progress event."""
|
||||||
def usb_event(self, connected: bool) -> LayoutState | None:
|
def usb_event(self, connected: bool) -> LayoutState | None:
|
||||||
"""Receive a USB connect/disconnect event."""
|
"""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:
|
def timer(self, token: int) -> LayoutState | None:
|
||||||
"""Callback for the timer set by `attach_timer_fn`.
|
"""Callback for the timer set by `attach_timer_fn`.
|
||||||
This function should be called by the executor after the corresponding
|
This function should be called by the executor after the corresponding
|
||||||
|
Loading…
Reference in New Issue
Block a user