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.
Support separate USB2/USB3 stacks : by default, both are set to use
usb_device_0
so the user does not need to be concerned with this. But if the user wants to, the variablesusb2_backend_current_usb_device
andusb3_backend_current_usb_device
can be modified to point tousb_device_0
andusb_device_1
(or another device struct).You need the Hydradancer board for that (HydraUSB3 board with a USB3 port without USB2 downgrade, as the USB2 downgrade is used as a separate USB connection).
All examples have been tested for regressions with the new Hydradancer board and the previous HydraUSB3 boards, and a new example test_firmware_usb_loopback_separate_usb_stacks has been added to test the separate stacks by creating two loopback devices on the same WCH569 chip. The script
test_loopback.py
has been updated to select a device by adding--num_device
to run the test in parallel for both devices.usb_device_0
andusb_device_1
are predefined with default values so that the user does not have to set all endpoint handlers, even for endpoints that are not used (which isn't intuitive). I've also thought about letting the user define the devices and only give the pointer, but i'm leaving this for now.