1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

adapt config.py to new api

This commit is contained in:
Pavol Rusnak 2014-01-20 13:21:49 +01:00
parent 93d7fe5341
commit 733a4e979c
2 changed files with 24 additions and 7 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.pyc *.pyc
*.bin

View File

@ -5,22 +5,38 @@ from trezorlib.transport_pipe import PipeTransport
from trezorlib.transport_hid import HidTransport from trezorlib.transport_hid import HidTransport
from trezorlib.transport_socket import SocketTransportClient from trezorlib.transport_socket import SocketTransportClient
use_pipe = True use_real = True
if use_pipe: use_pipe = False
if use_real:
devices = HidTransport.enumerate()
TRANSPORT = HidTransport
TRANSPORT_ARGS = (devices[0], )
TRANSPORT_KWARGS = {'debug_link': False}
DEBUG_TRANSPORT = HidTransport
DEBUG_TRANSPORT_ARGS = (devices[0], )
DEBUG_TRANSPORT_KWARGS = {'debug_link': True}
elif use_pipe:
TRANSPORT = PipeTransport TRANSPORT = PipeTransport
TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor', False) TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor', False)
TRANSPORT_KWARGS = {}
DEBUG_TRANSPORT = PipeTransport DEBUG_TRANSPORT = PipeTransport
DEBUG_TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor_debug', False) DEBUG_TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor_debug', False)
DEBUG_TRANSPORT_KWARGS = {}
else: else:
devices = HidTransport.enumerate()
TRANSPORT = HidTransport TRANSPORT = HidTransport
TRANSPORT_ARGS = ('0x10c4:0xea80:000868D3', False) TRANSPORT_ARGS = (devices[0], )
TRANSPORT_KWARGS = {'debug_link': False}
DEBUG_TRANSPORT = SocketTransportClient DEBUG_TRANSPORT = SocketTransportClient
DEBUG_TRANSPORT_ARGS = ('trezor.bo:2000', False) DEBUG_TRANSPORT_ARGS = ('trezor.bo:2000', )
# DEBUG_TRANSPORT_ARGS = ('trezor.dyn:2000')
#DEBUG_TRANSPORT = SocketTransportClient DEBUG_TRANSPORT_KWARGS = {}
#DEBUG_TRANSPORT_ARGS = ('trezor.dyn:2000', False)