Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > How can I know the accurate number of bytes that were transfered

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



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

Post Reply
Follow this topic



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

onepig posted on 17 Apr 2013 9:18 PM PST
Senior Member
11 Forum Posts

 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




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

onepig posted on 18 Apr 2013 10:49 PM PST
Senior Member
11 Forum Posts

 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 .



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

Gayathri posted on 02 May 2013 11:09 PM PST
Cypress Employee
428 Forum Posts

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






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20