File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -218,8 +218,6 @@ def _open_itf_cb(self, desc):
218
218
# - Find the highest numbered interface provided to the callback
219
219
# (which will be the first interface, unless we're scanning
220
220
# multiple interfaces inside an IAD.)
221
- self ._eps = {}
222
- self ._ep_cbs = {}
223
221
offs = 0
224
222
max_itf = itf_num
225
223
while offs < len (desc ):
@@ -246,14 +244,14 @@ def _open_itf_cb(self, desc):
246
244
def _reset_cb (self ):
247
245
# Callback when the USB device is reset by the host
248
246
249
- # Cancel outstanding transfer callbacks
250
- for k in self ._ep_cbs .keys ():
251
- self ._ep_cbs [k ] = None
252
-
253
247
# Allow interfaces to respond to the reset
254
248
for itf in self ._itfs .values ():
255
249
itf .handle_reset ()
256
250
251
+ # Rebuilt when host re-enumerates
252
+ self ._eps = {}
253
+ self ._ep_cbs = {}
254
+
257
255
def _submit_xfer (self , ep_addr , data , done_cb = None ):
258
256
# Singleton function to submit a USB transfer (of any type except control).
259
257
#
You can’t perform that action at this time.
0 commit comments