cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

IyRa_4728991
New Contributor

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.

0 Likes
1 Solution
YatheeshD_36
Moderator
Moderator

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

View solution in original post

0 Likes
5 Replies