1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-23 07:58:09 +00:00
trezor-firmware/trezorlib/transport
matejcik 88988172b9 bridge: perform HTTP request in read, not write
This allows us to return early from a `write`, which we need in cases
where we want to perform an operation inbetween `read` and `write` -
namely, callback for ButtonRequest should technically be invoked after
returning ButtonAck but before waiting for device's response.

Of course that doesn't really work. The callback will actually be
invoked _before_ ButtonAck, so there's still the condition that it must
return immediately or the device gets stuck with a black screen.

But doing this allows us to write code *as if* it worked, which lets the
other transports run free and wild, by which I mean, do the Right Thing
2018-10-10 13:15:28 +02:00
..
__init__.py
bridge.py bridge: perform HTTP request in read, not write 2018-10-10 13:15:28 +02:00
hid.py
udp.py
webusb.py