XferData | Cypress Semiconductor


Summary: 2 Replies, Latest post by aasi on 09 Jun 2012 01:28 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
JumpeiKochi's picture
12 posts

I would like to know XferData(ref buf, ref len) at Visual C# method.
When I transfer from Device to Host, Does "len" need to be the maximum packet size?

For example, what kind of method should be used to receive 16 bytes of data from HOST?
Although I tested the following contents, I was not successful.

int Len = 16;
byte[] Buf = new byte[Len];
BulkEndpoint.XferData(ref Buf, ref Len);
Best Regards,

dreitz's picture
70 posts

I use BulkOutEndPt and BulkInEndPt instead of BulkEndPt.


int len = 3;

byte[] buf = new byte[len];

buf[0] = (byte)Commands.VR_SET_INTEGRATION_TIME;

buf[1] = (byte)(integrationTime & 0xff);

buf[2] = (byte)((integrationTime >> 8) & 0xff);

if (myDev.BulkOutEndPt.XferData(ref buf, ref len) == true)



                 return Responses.PASSED;


               return Responses.FAILED;


            return Responses.INCOMMANDFAILED;



return Responses.OUTCOMMANDFAILED;





          if (buf[0] == 0)

     len = 1;

     if (myDev.BulkInEndPt.XferData(ref buf, ref len) == true)

aasi's picture
Cypress Employee
1166 posts

BulkEndPoint would point to the first Bulk Endpoint of your device. If it is a OUT endpoint was it configured to send 16 bytes?

If it is a IN endpoint then if it was configured properly then it should have received the data and XferData would have returned success. Please let us know your configuration.



Log in to post new comments.