1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-08 11:16:09 +00:00
trezor-firmware/src/main.py
Jan Pochyla 099767d592
session/workflow overhaul
- lazy loading and importing of protobuf messages
- workflow dispatching through codec pipeline on the first message report

HACK: workflow killing
TODO: cap on concurrent sessions
TODO: ui locking/queuing
TODO: session storage
TODO: tests
2016-09-27 17:26:06 +02:00

32 lines
738 B
Python

import trezor.main
from trezor import msg
from trezor import ui
from trezor import wire
# Load all applications
from apps import playground
from apps import homescreen
from apps import management
from apps import wallet
# Initialize all applications
playground.boot()
homescreen.boot()
management.boot()
wallet.boot()
# Change backlight to white for better visibility
ui.display.backlight(255)
# Just a demo to show how to register USB ifaces
msg.setup([(1, 0xF53C), (2, 0xF1D0)])
# Initialize the wire codec pipeline
wire.setup()
# Load default homescreen
from apps.homescreen.layout_homescreen import layout_homescreen
# Run main even loop and specify, which screen is default
trezor.main.run(default_workflow=layout_homescreen)