1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-02 12:52:34 +00:00
trezor-firmware/core/mocks/generated/trezorio/ble.pyi
tychovrahe d237e155d6 feat(core): rudimentary BLE support
[no changelog]

Co-authored-by: Martin Milata <martin@martinmilata.cz>
2024-01-25 00:21:19 +01:00

70 lines
1.4 KiB
Python

from typing import *
INTERNAL: int # interface id for internal (stm<->nrf) connection
EXTERNAL: int # interface id for ble client connection
# extmod/modtrezorio/modtrezorio-ble.h
def update_init(data: bytes, binsize: int) -> bool:
"""
Initializes the BLE firmware update. Returns true if the update finished
with only the initial chunk. False means calling `update_chunk` is
expected.
"""
# extmod/modtrezorio/modtrezorio-ble.h
def update_chunk(chunk: bytes) -> bool:
"""
Writes next chunk of BLE firmware update. Returns true if the update is
finished, or false if more chunks are expected.
"""
# extmod/modtrezorio/modtrezorio-ble.h
def write_int(self, msg: bytes) -> int:
"""
Sends internal message to NRF.
"""
# extmod/modtrezorio/modtrezorio-ble.h
def write_ext(self, msg: bytes) -> int:
"""
Sends message over BLE
"""
# extmod/modtrezorio/modtrezorio-ble.h
def erase_bonds() -> None:
"""
Erases all BLE bonds
"""
# extmod/modtrezorio/modtrezorio-ble.h
def start_comm() -> None:
"""
Start communication with BLE chip
"""
# extmod/modtrezorio/modtrezorio-ble.h
def start_advertising(whitelist: bool) -> None:
"""
Start advertising
"""
# extmod/modtrezorio/modtrezorio-ble.h
def stop_advertising(whitelist: bool) -> None:
"""
Stop advertising
"""
# extmod/modtrezorio/modtrezorio-ble.h
def disconnect() -> None:
"""
Disconnect BLE
"""