Replies: 2 comments 2 replies
-
|
A few more findings: The function So as far as endpoint indexing goes I think I have what I need, but I am still curious if |
Beta Was this translation helpful? Give feedback.
-
|
@adirobu84 I think pio_usb_device_transfer is what you are looking for. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that only the IN endpoints are indexed and the function
pio_usb_get_endpointis therefore only able to return IN endpoints. What about OUT endpoints? Is there a reason for this or simply an oversight?In my code I expect to call the functions
pio_usb_get_in_dataandpio_usb_set_out_datato receive and send data from/to the host. For that I need a pointer to the respective endpoints, which are retrieved usingpio_usb_get_endpoint. Not being able to get a pointer to an OUT endpoint, I'm not sure howpio_usb_get_in_datacan be used.For clarification, and OUT endpoint refers to direction from host to device (OUT from host) and we would use
pio_usb_get_in_datato retrieve it on the device. Similarlypio_usb_set_out_datasends data on an IN endpoint, which transfers it from the device to the host (IN to host).Now, I can just modify the API so I can get both IN and OUT endpoints using
pio_usb_get_endpoint, but I am wondering if I am missing something and how others are using the API to implement their devices?In general, I'm missing a good example on interacting with both control and regular endpoints. If anyone has some guidance this would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions