tinyusb icon indicating copy to clipboard operation
tinyusb copied to clipboard

Fix asserting at 853 in dcd_edpt_close on endpoint re-open

Open Iktek opened this issue 3 years ago • 0 comments

Solves issue discussed in: https://github.com/hathach/tinyusb/discussions/1439

This is not a complete solution as we only can re-open an endpoint with the same size. But it improves the behaviour allowing to close and re-open an endpoint that is not opened at last

We now let fifos allocated if we can't free them. We check if there is already an allocated fifo for that endpoint. Assert when that fifo has the wrong size

This could be further improved by collecting the already allocated fifos with it's size in a list and re-assign them if they are fitting and try to allocate a new one if they're not fitting.

Iktek avatar May 03 '22 08:05 Iktek