core: enable debuglink+webauth together in the emulator firmware

pull/516/head
Pavol Rusnak 5 years ago
parent d9e9fa6ceb
commit 898c421752
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -47,8 +47,8 @@ def _boot_default() -> None:
if __debug__:
import apps.debug
else:
if not utils.BITCOIN_ONLY:
if not __debug__ or utils.EMULATOR:
import apps.webauthn
# boot applications
@ -68,8 +68,8 @@ def _boot_default() -> None:
apps.binance.boot()
if __debug__:
apps.debug.boot()
else:
if not utils.BITCOIN_ONLY:
if not __debug__ or utils.EMULATOR:
apps.webauthn.boot(usb.iface_webauthn)
# run main event loop and specify which screen is the default

@ -1,4 +1,4 @@
from trezor import io
from trezor import io, utils
from apps.common.storage.device import get_device_id
@ -28,12 +28,13 @@ if __debug__:
ep_out=0x03,
ep_cmd=0x84,
)
else:
if not utils.BITCOIN_ONLY:
if not __debug__ or utils.EMULATOR:
# interface used for FIDO/U2F and FIDO2/WebAuthn HID transport
iface_webauthn = io.HID(
iface_num=1,
ep_in=0x82,
ep_out=0x02,
iface_num=4 if __debug__ else 1,
ep_in=0x85 if __debug__ else 0x82,
ep_out=0x04 if __debug__ else 0x02,
report_desc=bytes([
0x06, 0xd0, 0xf1, # USAGE_PAGE (FIDO Alliance)
0x09, 0x01, # USAGE (U2F HID Authenticator Device)
@ -67,5 +68,6 @@ bus.add(iface_wire)
if __debug__:
bus.add(iface_debug)
bus.add(iface_vcp)
else:
if not utils.BITCOIN_ONLY:
if not __debug__ or utils.EMULATOR:
bus.add(iface_webauthn)

Loading…
Cancel
Save