1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-27 01:48:17 +00:00

use hid_version=2 for HidTransportV2

This commit is contained in:
Pavol Rusnak 2016-09-26 20:52:33 +02:00
parent ec4e85b008
commit 25672288cf
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -68,6 +68,9 @@ class _HidTransport(object):
self.hid.set_nonblocking(True)
# determine hid_version
if isinstance(self, HidTransportV2):
self.hid_version = 2
else:
r = self.hid.write([0, 63, ] + [0xFF] * 63)
if r == 65:
self.hid_version = 2