Example #1
0
if __debug__:
    from apps import debug
from apps import homescreen
from apps import management
from apps import wallet
from apps import ethereum
from apps import fido_u2f

# Initialize all applications
if __debug__:
    debug.boot()
homescreen.boot()
management.boot()
wallet.boot()
ethereum.boot()
fido_u2f.boot()

# HACK: keep storage loaded at all times
from apps.common import storage

# Change backlight to white for better visibility
ui.display.backlight(ui.BACKLIGHT_NORMAL)

# Register USB ifaces

_IFACE_WIRE = const(0x00)
_IFACE_VCP = const(0x01)
_IFACE_VCP_DATA = const(0x02)
_IFACE_U2F = const(0x03)

hid_wire = msg.HID(
Example #2
0
# load applications
from apps.common import storage
if __debug__:
    from apps import debug
from apps import homescreen
from apps import management
from apps import wallet
from apps import ethereum
from apps import fido_u2f

# boot applications
if __debug__:
    debug.boot()
homescreen.boot()
management.boot()
wallet.boot()
ethereum.boot()
fido_u2f.boot(usb_u2f)

# initialize the wire codec and start the USB
wire.setup(usb_wire)
usb.open()

# load default homescreen
from apps.homescreen.homescreen import layout_homescreen

# run main even loop and specify which screen is default
workflow.startdefault(layout_homescreen)
loop.run()