1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-04 13:38:28 +00:00
trezor-firmware/src/main.py

34 lines
833 B
Python
Raw Normal View History

2016-04-28 21:48:27 +00:00
import trezor.main
2016-05-25 00:38:10 +00:00
from trezor import msg
from trezor import ui
from trezor import wire
2016-04-28 21:48:27 +00:00
# Load all applications
from apps import homescreen
from apps import management
from apps import wallet
2016-04-28 21:48:27 +00:00
# Initialize all applications
homescreen.boot()
management.boot()
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
ui.display.backlight(ui.BACKLIGHT_NORMAL)
2016-06-09 14:32:46 +00:00
# Just a demo to show how to register USB ifaces
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
# 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
trezor.main.run(default_workflow=layout_homescreen)