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:
parent
49d1e9434d
commit
066866488b
22
core/src1/main.py
Normal file
22
core/src1/main.py
Normal 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
29
core/src1/usb.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user