diff options
author | Devaev Maxim <[email protected]> | 2020-11-22 14:33:18 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-11-22 14:33:18 +0300 |
commit | b7e0ee3300ddca0b4c7049ee9bfb172996b56ff2 (patch) | |
tree | d5ac6caf34cf0eeef3e464b7f1102cc8e3ddf469 /kvmd/plugins/hid/spi.py | |
parent | d8a631ab84de53ad387c452f55b6060bcc2300c0 (diff) | |
parent | 48550d2e78acb7e2669f8bd9595330c4001302f1 (diff) |
Merge branch 'multihid'
Diffstat (limited to 'kvmd/plugins/hid/spi.py')
-rw-r--r-- | kvmd/plugins/hid/spi.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kvmd/plugins/hid/spi.py b/kvmd/plugins/hid/spi.py index 7dadac0e..785ca779 100644 --- a/kvmd/plugins/hid/spi.py +++ b/kvmd/plugins/hid/spi.py @@ -67,7 +67,7 @@ class _SpiPhyConnection(BasePhyConnection): assert request[0] == 0x33 deadline_ts = time.monotonic() + self.__read_timeout - dummy = b"\x00" * 8 + dummy = b"\x00" * 10 while time.monotonic() < deadline_ts: if bytes(self.__xfer(dummy)) == dummy: break @@ -81,15 +81,15 @@ class _SpiPhyConnection(BasePhyConnection): deadline_ts = time.monotonic() + self.__read_timeout found = False while time.monotonic() < deadline_ts: - for byte in self.__xfer(b"\x00" * (5 - len(response))): + for byte in self.__xfer(b"\x00" * (9 - len(response))): if not found: - if byte != 0x33: + if byte == 0: continue found = True response.append(byte) - if len(response) == 4: + if len(response) == 8: break - if len(response) == 4: + if len(response) == 8: break else: get_logger(0).error("SPI timeout reached while responce waiting") |