Refactor the file structure for USB DFU class to facilitate separate PID for USB DFU when in DFU mode. As required by USB DFU 1.1 Section 2, the PID in the USB device descriptor must be different between the Run-time and DFU mode device descriptor to avoid problems caused by the host OS caching the remaining descriptors when switching to DFU mode, thus hiding the new interface descriptors from applications on the host and reporting the Run-time descriptors when the device is in DFU mode. To avoid adding too much clutter to the root USB class Kconfig and CMakeLists files, move the DFU class files into their own directory with dedicated Kconfig and CMakeLists.txt. Signed-off-by: Michael Rosen <michael.r.rosen@intel.com>
12 lines
333 B
CMake
12 lines
333 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_sources(usb_dfu.c)
|
|
|
|
if(CONFIG_USB_DEVICE_PID EQUAL CONFIG_USB_DEVICE_DFU_PID)
|
|
message(WARNING
|
|
"Run-Time and DFU Mode VID and PID are equal, which can lead to incorrect \
|
|
behavior on some operating systems; see DFU 1.1 Specification Ch. 2 for \
|
|
more details."
|
|
)
|
|
endif()
|