1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 06:48:16 +00:00

core: add temporary "src1" folder

This commit is contained in:
Pavol Rusnak 2020-05-04 16:00:29 +00:00
parent 49d1e9434d
commit 066866488b
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 51 additions and 0 deletions

22
core/src1/main.py Normal file
View File

@ -0,0 +1,22 @@
import usb
usb.bus.open()
import trezorio as io
from trezorui import Display
d = Display()
d.clear()
d.backlight(255)
i = 0
while True:
d.print("Loop %d\n" % i)
i += 1
r = [0, 0]
if io.poll([io.TOUCH], r, 1000000):
print("TOUCH", r)
else:
print("NOTOUCH")

29
core/src1/usb.py Normal file
View File

@ -0,0 +1,29 @@
import trezorio as io
iface_wire = io.WebUSB(
iface_num=0,
ep_in=0x81,
ep_out=0x01,
)
iface_vcp = io.VCP(
iface_num=2,
data_iface_num=3,
ep_in=0x83,
ep_out=0x03,
ep_cmd=0x84,
)
bus = io.USB(
vendor_id=0x1209,
product_id=0x53C1,
release_num=0x0100,
manufacturer="SatoshiLabs",
product="TREZOR",
interface="TREZOR Interface",
serial_number="1234",
usb21_landing=False,
)
bus.add(iface_wire)
bus.add(iface_vcp)