USB driver for custom ASM firmware (#15597)

* USB driver for custom ASM firmware

* timeout

* fix mypy

* pcie mem read

* flip in f/w

* one tx

* litle endian

* autodetect custom

* mock bypass

* lint

* clean
This commit is contained in:
George Hotz
2026-04-07 13:45:41 +08:00
committed by GitHub
parent 810d7c00cd
commit 2b01ca59dd
3 changed files with 135 additions and 7 deletions

View File

@@ -202,7 +202,8 @@ class MockASM24State:
return None
class MockUSB3:
def __init__(self, *args, **kwargs): pass
def __init__(self, *args, **kwargs):
self.product, self.is_custom = "", False
def send_batch(self, cdbs:list[bytes], idata:list[int]|None=None, odata:list[bytes|None]|None=None) -> list[bytes|None]:
assert _mock_usb_state is not None
idata, odata = idata or [0] * len(cdbs), odata or [None] * len(cdbs)