Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reintroduce RAW_IO support in WinUSB backend #1512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HannesFranke-smartoptics

This is a continuation of PR #1297 which also supports composite devices, using the same mechanism as other functions which support composite devices, e.g. libusb_submit_transfer().

It provides RAW_IO support by introducing three new API functions:

int libusb_endpoint_supports_raw_io(libusb_device_handle* dev_handle, uint8_t endpoint);
int libusb_endpoint_set_raw_io(libusb_device_handle* dev_handle, uint8_t endpoint, int enable);
int libusb_get_max_raw_io_transfer_size(libusb_device_handle *dev_handle, uint8_t endpoint);

RAW_IO was originally added in commit
9e4bb9c via set_option(), then
removed in dac541d.

This commit is based on code written by martinling in PR libusb#1297.

It reintroduces RAW_IO by using three new functions:
- libusb_endpoint_supports_raw_io()
- libusb_endpoint_set_raw_io()
- libusb_get_max_raw_io_transfer_size()

This follows lengthy discussions in PR libusb#1208 and libusb#1297 on how to
implement RAW_IO in a generic way. Ultimately martinling chose the
approach of using multiple new API functions in comment
libusb#1208 (comment)
> On further reflection, I am much less keen on the constraint API
> idea if there is no other use case for it. So far nobody here
> has come up with one, and I haven't either.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants