Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
Established the communication between cypress device and android device using libusb. we are using libcyusb.cpp wrapper file to use libusb functions. I can able to get Handle of an USB(cypress device), PID, VID of the connected device by using libcyusb function calls.
Now i want to communicate with hardware peripheral. In the windows code "CCyUSBEndPoint::XferData" function used to send the data. This function available in CyAPI.cpp file.
Can anyone suggest a function corresponding to that API(CCyUSBEndPoint::XferData) in the libcyusb.cpp file?
Initially, you will have to claim the interface (interface 0) of the device using the cyusb_claim_interface() function with the handle.
After the interface is claimed successfully, use the cyusb_bulk_transfer(), cyusb_control_transfer () or cyusb_interrupt_transfer() functions to perform data transfers to or from the device to the host (android).
Please refer to the cyusb_linux_programmers_guide.pdf from the FX3 linux SDK for the description of each function.
Interface can be released using cyusb_release_interface() after all the data transfers with the device is complete.