tools/pydfu.py: Call set_configuration() on fresh USB device object.

This call is required before using the device (some operating systems don't
need it but others do).  Fixes issue #3476.
This commit is contained in:
Damien George 2017-12-14 10:08:37 +11:00
parent 43141ddb55
commit bb516af1eb
1 changed files with 1 additions and 0 deletions

View File

@ -81,6 +81,7 @@ def init():
if len(devices) > 1:
raise ValueError("Multiple DFU devices found")
__dev = devices[0]
__dev.set_configuration()
# Claim DFU interface
usb.util.claim_interface(__dev, __DFU_INTERFACE)