2016-04-28 21:48:27 +00:00
|
|
|
import trezor.main
|
2016-05-25 00:38:10 +00:00
|
|
|
from trezor import msg
|
2016-09-21 12:21:18 +00:00
|
|
|
from trezor import ui
|
|
|
|
from trezor import wire
|
2016-04-28 21:48:27 +00:00
|
|
|
|
|
|
|
# Load all applications
|
2016-05-25 12:27:22 +00:00
|
|
|
from apps import homescreen
|
2016-06-01 13:06:00 +00:00
|
|
|
from apps import management
|
2016-05-25 12:27:22 +00:00
|
|
|
from apps import wallet
|
2016-04-28 21:48:27 +00:00
|
|
|
|
|
|
|
# Initialize all applications
|
2016-05-25 12:27:22 +00:00
|
|
|
homescreen.boot()
|
2016-06-01 13:06:00 +00:00
|
|
|
management.boot()
|
2016-05-25 12:27:22 +00:00
|
|
|
wallet.boot()
|
2016-04-28 21:48:27 +00:00
|
|
|
|
2016-06-09 14:32:46 +00:00
|
|
|
# Change backlight to white for better visibility
|
2016-10-08 11:02:02 +00:00
|
|
|
ui.display.backlight(ui.BACKLIGHT_NORMAL)
|
2016-06-08 12:48:04 +00:00
|
|
|
|
2016-06-09 14:32:46 +00:00
|
|
|
# Just a demo to show how to register USB ifaces
|
2016-10-11 10:33:02 +00:00
|
|
|
msg.set_interfaces([0xFF00, 0xFF01, 0xF1D0])
|
|
|
|
# and list them
|
|
|
|
for i, up in enumerate(msg.get_interfaces()):
|
|
|
|
print("iface %d: usage_page 0x%04x" % (i + 1, up))
|
|
|
|
|
2016-05-25 00:38:10 +00:00
|
|
|
|
2016-09-21 12:21:18 +00:00
|
|
|
# Initialize the wire codec pipeline
|
|
|
|
wire.setup()
|
|
|
|
|
2016-04-28 21:48:27 +00:00
|
|
|
# Load default homescreen
|
2016-06-08 12:49:58 +00:00
|
|
|
from apps.homescreen.layout_homescreen import layout_homescreen
|
2016-04-28 21:48:27 +00:00
|
|
|
|
|
|
|
# Run main even loop and specify, which screen is default
|
2016-09-21 12:21:18 +00:00
|
|
|
trezor.main.run(default_workflow=layout_homescreen)
|