You are here

viewing integer values from vendor command | Cypress Semiconductor

viewing integer values from vendor command

Summary: 1 Reply, Latest post by aasi on 13 Sep 2012 08:10 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
giginjose's picture
36 posts


I am working on Cy7C68013-A usb HS controller. I need to issue a vendor command, where I am expecting an integer count value (int final_count). The value of "final_count" can comfortably go beyond 255. But since EP0BUF[0] supports only a maximum value of 255 (8 bits), I am finding trouble to get any value beyond 255. 

Where can I assign my "final_count" variable, so that I can correctly read the integer value even if it crosses the 255 limit. 

I have my vendor command function as follows:

switch (SETUPDAT[1])


case 0xAA:

EP0BUF[0] = final_count;

EP0BCH = 0;

EP0BCL = 1;




In the above case, the EP0BUF[0] has a limit of 255, which will assign incorrect value from  my "final_count". The "final_count" value can go near to 2000. 

Please give me a solution, where I can read the value of "final_count" on issuing a vendor command ? 

Thank You

aasi's picture
Cypress Employee
1166 posts

 Why not assign the MSB to EP0BUF[1] and output 2 bytes??

Log in to post new comments.