You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.2 KiB
60 lines
1.2 KiB
6 years ago
|
# isort:skip_file
|
||
|
|
||
7 years ago
|
# unlock the device
|
||
7 years ago
|
import boot # noqa: F401
|
||
7 years ago
|
|
||
7 years ago
|
# prepare the USB interfaces, but do not connect to the host yet
|
||
|
import usb
|
||
7 years ago
|
|
||
7 years ago
|
from trezor import loop, wire, workflow, utils
|
||
8 years ago
|
|
||
7 years ago
|
# load applications
|
||
7 years ago
|
import apps.homescreen
|
||
|
import apps.management
|
||
|
import apps.wallet
|
||
|
import apps.ethereum
|
||
7 years ago
|
import apps.lisk
|
||
6 years ago
|
import apps.monero
|
||
7 years ago
|
import apps.nem
|
||
6 years ago
|
import apps.stellar
|
||
6 years ago
|
import apps.ripple
|
||
6 years ago
|
import apps.cardano
|
||
6 years ago
|
import apps.tezos
|
||
6 years ago
|
|
||
7 years ago
|
if __debug__:
|
||
7 years ago
|
import apps.debug
|
||
7 years ago
|
else:
|
||
6 years ago
|
import apps.webauthn
|
||
7 years ago
|
|
||
|
# boot applications
|
||
7 years ago
|
apps.homescreen.boot()
|
||
|
apps.management.boot()
|
||
|
apps.wallet.boot()
|
||
|
apps.ethereum.boot()
|
||
7 years ago
|
apps.lisk.boot()
|
||
6 years ago
|
apps.monero.boot()
|
||
7 years ago
|
apps.nem.boot()
|
||
6 years ago
|
apps.stellar.boot()
|
||
6 years ago
|
apps.ripple.boot()
|
||
6 years ago
|
apps.cardano.boot()
|
||
6 years ago
|
apps.tezos.boot()
|
||
7 years ago
|
if __debug__:
|
||
7 years ago
|
apps.debug.boot()
|
||
7 years ago
|
else:
|
||
6 years ago
|
apps.webauthn.boot(usb.iface_webauthn)
|
||
7 years ago
|
|
||
7 years ago
|
# initialize the wire codec and start the USB
|
||
7 years ago
|
wire.setup(usb.iface_wire)
|
||
7 years ago
|
if __debug__:
|
||
7 years ago
|
wire.setup(usb.iface_debug)
|
||
|
usb.bus.open()
|
||
8 years ago
|
|
||
7 years ago
|
# switch into unprivileged mode, as we don't need the extra permissions anymore
|
||
7 years ago
|
utils.set_mode_unprivileged()
|
||
7 years ago
|
|
||
7 years ago
|
# run main event loop and specify which screen is the default
|
||
7 years ago
|
from apps.homescreen.homescreen import homescreen
|
||
6 years ago
|
|
||
7 years ago
|
workflow.startdefault(homescreen)
|
||
7 years ago
|
loop.run()
|