mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-19 08:39:03 +00:00
fixup! chore(core): adapt trezorlib transports to session based [no changelog]
This commit is contained in:
parent
821e6b9fce
commit
d12bf422f3
@ -84,11 +84,11 @@ class ProtocolV1Channel(Channel):
|
||||
|
||||
buffer = bytearray(b"##" + header + message_data)
|
||||
while buffer:
|
||||
# Report ID, data padded to 63 bytes
|
||||
# Report ID, data padded to (chunk_size - 1) bytes
|
||||
chunk = b"?" + buffer[: chunk_size - 1]
|
||||
chunk = chunk.ljust(chunk_size, b"\x00")
|
||||
self.transport.write_chunk(chunk)
|
||||
buffer = buffer[63:]
|
||||
buffer = buffer[chunk_size - 1:]
|
||||
|
||||
def _read(self, timeout: float | None = None) -> t.Tuple[int, bytes]:
|
||||
if timeout is None:
|
||||
|
Loading…
Reference in New Issue
Block a user