1 Reply Latest reply on Sep 13, 2012 8:10 PM by anand.srinivasan.asokan

    viewing integer values from vendor command

    gigin.jose

       Hi, 

         

      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;

         

      EP0CS |= bmHSNAK;

         

      break;

         

      }

         

      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