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.
-
I noticed that only the IN endpoints are indexed and the function
pio_usb_get_endpoint
is 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_data
andpio_usb_set_out_data
to 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_data
can 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_data
to retrieve it on the device. Similarlypio_usb_set_out_data
sends 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