USB: Remove DFU interface from Uno R4 WiFi #471
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.
Change motivation summary
The Uno R4 WiFi mistakenly presents a DFU port to its host when connected via USB.
Change motivation details
When the Uno R4 WiFi is connected to a Windows host via USB cable, the Windows Device Manager app reveals that the device's DFU port is missing a driver. Attempting to install a driver via the Windows driver installer in this repository's ..\drivers folder does not resolve the issue. However, since the Uno R4 WiFi uploads applications via a COM port, not DFU, it should not be presenting a DFU port to the host at all.
Resolution summary
CFG_TUD_DFU_RUNTIME
.CFG_TUD_DFU_RUNTIME
value in the header file.Resolution notes
I have altered how all of the USB interface descriptors are constructed to unify the approach used for each and improve the maintainability of the code. This expanded the scope of changes that were strictly required to address the issue, but I felt it made the entire method a bit easier to understand and manage going forward.
Research supporting chosen resolution
Examination of the two files noted below leads me to believe that all board variants supported by this repository support DFU except the Uno R4 WiFi.
DFU device driver installer INF (../drivers/renesas.inf)
CFG_TUD_DFU_RUNTIME
enabled in their variant specific header file.Arduino boards definition (../boards.txt)
Notes
DISABLE_USB_SERIAL
macro is defined has been preserved. Specifically, when this macro is defined at compile time the device will not present either a DFU or a CDC interface to its host at runtime.