improve speed

This commit is contained in:
bongbui321 2024-03-19 04:21:30 -04:00
parent adb2bc78e6
commit 66b9871365
2 changed files with 6 additions and 1 deletions

2
.gitignore vendored
View file

@ -103,3 +103,5 @@ venv.bak/
# mypy
.mypy_cache/
edl_config.json

View file

@ -49,6 +49,8 @@ USB_RECIP_OTHER = 0x03
USB_RECIP_PORT = 0x04
USB_RECIP_RPIPE = 0x05
MAX_USB_BULK_BUFFER_SIZE = 16384
tag = 0
CDC_CMDS = {
@ -336,7 +338,8 @@ class usb_class(DeviceClass):
def write(self, command, pktsize=None):
if pktsize is None:
pktsize = self.EP_OUT.wMaxPacketSize
#pktsize = self.EP_OUT.wMaxPacketSize
pktsize = MAX_USB_BULK_BUFFER_SIZE
if isinstance(command, str):
command = bytes(command, 'utf-8')
pos = 0