Commit 57799d4
committed
Fix abrupt USB disconnection leaving stale data in DAP queue buffers.
Clearing the buffers in the USB_DISCONNECTING state, which then
moves to the USB_DISCONNECTED state.
The USB_DISCONNECTING state was never used, in the current codebase
nor the initial repo commit (well, second commit, first release):
bdacee7
It looks like this state might have been initialy designed as a way
to trigger a USB disconnection from the interface chip, as it
manually set usbd_connect(0) to disconnect.
As it was never used it's now the pre-disconnected state to run
code only once on state change:
connected->disconnecting->disconnected
Fixes #10891 parent 82dc31d commit 57799d4
File tree
3 files changed
+12
-6
lines changed- source
- board/microbitv2
- kl27z
- nrf52820
- daplink/interface
3 files changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
407 | 409 | | |
408 | 410 | | |
409 | 411 | | |
| |||
435 | 437 | | |
436 | 438 | | |
437 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
438 | 445 | | |
439 | 446 | | |
440 | 447 | | |
441 | 448 | | |
442 | 449 | | |
443 | | - | |
444 | 450 | | |
445 | 451 | | |
446 | 452 | | |
| |||
0 commit comments