- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I 'm using C# code from an application note (AN63620).
I need to send infortmation SETUPDAT[6] and SETUPDAT[7] to my Firmware.
C# APPLICATION SIDE :
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 ...
FIRMWARE SIDE :
// 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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please refer to the below example snippet:
The length parameter (SETUPDAT[6:7] = wLength) of the control transfer will be taken from the second parameter in the XferData() call.
In the above example the length SETUPDAT[6:7] will be equal to len.
Please let me know if you have any more queries.
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please refer to the Section 15.12.21 Setup Data - 8 Bytes from Mobl-USB_TRM FX2LP18 for complete details on the Setup Data bytes.
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, but my question was not clear en ought.
I understand the SETUDAT from Firmware FX2LP18 side.
What i need to know, is HOW can i managed it from USB Host Side using your SDK (Lib / dll / etc ...) ?
Using the C# project from the AN.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please refer to the below example snippet:
The length parameter (SETUPDAT[6:7] = wLength) of the control transfer will be taken from the second parameter in the XferData() call.
In the above example the length SETUPDAT[6:7] will be equal to len.
Please let me know if you have any more queries.
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Crystal Clear : THANKS !