4 Replies Latest reply on Sep 10, 2020 5:19 AM by JeBo_4132831

    FX2LP18 : How to manage SETUPDAT[7] and SETUPDAT[6]




      I 'm using C# code from an application note (AN63620).

      I need to send infortmation SETUPDAT[6] and SETUPDAT[7] to my Firmware.



                      CtrlEndPt = myDevice.ControlEndPt;


                      CtrlEndPt.Value is REPRENTATIVE of the valueParam SETUPDAT[2] & SETUPDAT[3] : RIGHT ?

                      CtrlEndPt.Index is REPRENTATIVE of the indexParam  SETUPDAT[4] & SETUPDAT[5] : RIGHT ?


                      But What About lengthParam ??


      Is there any way to set SETUPDAT[7] and SETUPDAT[6] in the code application C# side ?

      To pass this information to the FX2LP18 firmware ...



      // Retrieve parameters, sent in big endian format for STICEX vendor requests

      // (thus not respecting USB-2.0 spec, but 8051 processor endianness).

      // The 8051 is a big endian processor => no byte swap required, simply

      // cast the pointer

      valueParam  = *(WORD *)(&(SETUPDAT[2]));

      indexParam  = *(WORD *)(&(SETUPDAT[4]));

      // The length param is sent in little endian format by the CyUSB driver,

      // respecting the USB-2.0 spec.

      // The 8051 is a big endian processor => byte swap required

      lengthParam = ((WORD)(SETUPDAT[7]))<<8 | SETUPDAT[6];


      Thanks for help.