Commit graph

8 commits

Author SHA1 Message Date
Johann Fischer 4191602f11 usb: device_next: add helper to register all available class instances
Add helper to register/unregister all available class instances.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-14 19:17:13 +02:00
Tomasz Moń 6d5edf9255 tests: usb: fix build all test on qemu_cortex_m3
Reduce RAM disk size from 192 sectors down to 1 sector to solve linking
issue due to qemu_cortex_m3 target having too little RAM. The RAM disk
size does not really matter in this test case and should be as small as
possible.

Enable test random generator to solve missing sys_rand_get() required by
networking subsystem.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-13 12:01:31 -04:00
Johann Fischer 43c9176a3c tests: usb: remove feature usb_device dependency
The tests do not depend on the usb_device or usbd feature.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-11 11:38:09 +01:00
Tomasz Moń 5144d0f65f usb: device_next: Introduce speed specific configurations
USB High-Speed devices must be able to operate at both High-Speed and
Full-Speed. The USB specification allows the device to have different
configurations depending on connection speed. Modify the API to reflect
USB Specification requirements on what can (e.g. configurations) and
what cannot (e.g. VID, PID) be speed dependent.

While the class configurations for different speeds are completely
independent, the actual class instances are shared between operating
speeds (because only one speed can be active at a time). Classes are
free to provide different number of interfaces and/or endpoints for
different speeds. The endpoints are assigned for all operating speeds
during initialization.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-04-22 06:51:22 -07:00
Johann Fischer fa5cfbd937 test: device_next: add overlays to build all functions
Add overlays and test case to build all USB device functions.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-04-19 17:04:00 +00:00
Alberto Escolar Piedras 2231c3ab97 tests/subsys/usb/*: Enable for native_sim
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Anas Nashif 345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Johann Fischer ed7d56f04e tests: usb: add test for new USB device support
This is initial patch to add tests for new USB device support.
The test uses USB host support and virtual USB bus by default,
but should work on real hardware as well. For now, only the
Get Configuration and Set Interface requests are tested by default.
More tests will follow.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-10-01 09:26:07 +03:00