How can I know the accurate number of bytes that were transfered

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 Hello:

   

       I am tring to read data from AD using CY68013 and I don't know how many bytes that  it will return in a transmission. The method is Xferdata. the second parameter was set to 1024, which is bigger than actually bytes in the fifo. For example, at this moment, there are 512 bytes in the fifo, and  I use Xferdata to get those data. 

   

      But this method will return false, and the parameter, len, was set to 0. 

   

      Here is my question. if  i don't know how many bytes are in  the fifo, and I want to know how many bytes I got, what can I do?

   

 

   

thanks for your help.

   

Regards

   

Aaron

0 Likes
2 Replies
Anonymous
Not applicable

 oh, i am so sorry. the method xferdata will return how many bytes were transfered by the second parameter.

   

It is my mistake. 

   

best wishes to all of you .

0 Likes
Anonymous
Not applicable

 Yep, the second parameter in Xferdata reruns the actual number of bytes transferred.

0 Likes