- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I am new to USB environment. My aim is to port from windows to android to communicate with hardware peripheral using cypress device.
Existing system:
Windows Device <---> Cypress Device (FX3) <---> Hardware Peripheral
New system:
Android Device <---> Cypress Device (FX3) <---> Hardware Peripheral
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?
Best regards,
Iyaps.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
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.
Thanks,
Yatheesh