Skip to content

Commit

Permalink
Merge pull request #517 from bongbui321/packet_size
Browse files Browse the repository at this point in the history
Increase max usb bulk buffer size
  • Loading branch information
bkerler authored Mar 20, 2024
2 parents adb2bc7 + 66b9871 commit d52d83b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@ venv.bak/

# mypy
.mypy_cache/

edl_config.json
5 changes: 4 additions & 1 deletion edlclient/Library/Connection/usblib.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
USB_RECIP_PORT = 0x04
USB_RECIP_RPIPE = 0x05

MAX_USB_BULK_BUFFER_SIZE = 16384

tag = 0

CDC_CMDS = {
Expand Down Expand Up @@ -336,7 +338,8 @@ def close(self, reset=False):

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
Expand Down

0 comments on commit d52d83b

Please sign in to comment.