Currently, USB Host unit tests that require a software triggered disconnection/
reconnection rely on the 'usb_phy_action()' function.
This commit replaces those calls with 'hcd_port_command()' or
'usb_host_lib_set_root_port_power()'.
Note: Also removed 'test_usb_common.h/c' as it is no longer necessary are the
function call replacements.
- usb host reads device's configuration on request
- a control transfer is sent
- memory is allocated for a new descriptor
- user must manually free the memory
Checking for an exact match for product or serial and string descriptors can
lead to test failures if the USB devices connected to the runner is changed. This
commit adds some kconfig options to make the string descriptor checks optional,
with the product and serial string checks being disabled by default.
Previously, descriptors of the test devices were stored direclty in the mock
device files (e.g., "mock_[hid|msc].[h|c]"). This commit splits out the device
descriptors to separate files (e.g., "dev_[hid|msc].c") along with getter
functions.
Users that want to run the tests locally on a different device simply need to
update the "dev_[hid|msc].c" file for their device.
- added new test for usb_host_lib example for all targets
- CI USB host test are run on esp32p4
- CI USB device tests temporarily disabled until usb_device runner is fixed
- hcd and usb_host tests which do not require PHY are run on esp32p4
Some component test apps do not use the "set(COMPONENTS main)" command in their
project level "CMakeLists.txt", thus leading to their builds pulling in all
ESP-IDF components.
This commit trims the build of multiple component test apps:
- Add "set(COMPONENTS main ...)" to project level "CMakeLists.txt"
- Add missing "PRIV_REQUIRES" in some "main" component "CMakeLists.txt"
Also removed repeated configuraiton options in legacy_i2c_driver/sdkconfig.ci.defaults
as they are already specified in legacy_i2c_driver/sdkconfig.defaults