mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 05:28:40 +00:00
tests/config: fix usb hid logic
This commit is contained in:
parent
5860207e68
commit
91222b4687
@ -52,27 +52,26 @@ def pipe_exists(path):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
if HID_ENABLED:
|
if HID_ENABLED and len(HidTransport.enumerate()) > 0:
|
||||||
|
|
||||||
devices = HidTransport.enumerate()
|
devices = HidTransport.enumerate()
|
||||||
if len(devices) > 0:
|
print('Using TREZOR')
|
||||||
print('Using TREZOR')
|
TRANSPORT = HidTransport
|
||||||
TRANSPORT = HidTransport
|
TRANSPORT_ARGS = (devices[0],)
|
||||||
TRANSPORT_ARGS = (devices[0],)
|
TRANSPORT_KWARGS = {'debug_link': False}
|
||||||
TRANSPORT_KWARGS = {'debug_link': False}
|
DEBUG_TRANSPORT = HidTransport
|
||||||
DEBUG_TRANSPORT = HidTransport
|
DEBUG_TRANSPORT_ARGS = (devices[0],)
|
||||||
DEBUG_TRANSPORT_ARGS = (devices[0],)
|
DEBUG_TRANSPORT_KWARGS = {'debug_link': True}
|
||||||
DEBUG_TRANSPORT_KWARGS = {'debug_link': True}
|
|
||||||
|
|
||||||
elif PIPE_ENABLED and pipe_exists('/tmp/pipe.trezor.to'):
|
elif PIPE_ENABLED and pipe_exists('/tmp/pipe.trezor.to'):
|
||||||
|
|
||||||
print('Using Emulator (v1=pipe)')
|
print('Using Emulator (v1=pipe)')
|
||||||
TRANSPORT = PipeTransport
|
TRANSPORT = PipeTransport
|
||||||
TRANSPORT_ARGS = ('/tmp/pipe.trezor', False)
|
TRANSPORT_ARGS = ('/tmp/pipe.trezor', False)
|
||||||
TRANSPORT_KWARGS = {}
|
TRANSPORT_KWARGS = {}
|
||||||
DEBUG_TRANSPORT = PipeTransport
|
DEBUG_TRANSPORT = PipeTransport
|
||||||
DEBUG_TRANSPORT_ARGS = ('/tmp/pipe.trezor_debug', False)
|
DEBUG_TRANSPORT_ARGS = ('/tmp/pipe.trezor_debug', False)
|
||||||
DEBUG_TRANSPORT_KWARGS = {}
|
DEBUG_TRANSPORT_KWARGS = {}
|
||||||
|
|
||||||
elif UDP_ENABLED:
|
elif UDP_ENABLED:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user