Merge pull request #517 from bongbui321/packet_size

Increase max usb bulk buffer size
This commit is contained in:
Bjoern Kerler 2024-03-20 08:41:53 +01:00 committed by GitHub
commit d52d83bcc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

2
.gitignore vendored
View file

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

View file

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