Rework ESP32 configuration descriptor builder #372
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously configuration descriptor is built using esp32-hal-tinyusb.c since it is not possible to do so in application in early stage, since lots of callbacks is strong one in esp32 core. Apperantly, things got changes and it is possible now to override all those descriptor callback in arduino-esp32 core. esp32-hal-tinyusb.c build configuration during init() therefore not very dynamic which make it difficult to change descriptor in setup() while Video class has very sophisticaed descriptors hiearachy.
This PR make esp32 configuration descriptor is built/update just like other ports. There is quite a bit of changes but should not change the behavior since Serial still use ESP USBCDC implementation.
Also add new dwc2 driver for esp32 as well.