Page 1 of 1

usbFunctionSetup and usbFunctionWrite

Posted: Wed Dec 22, 2010 12:00 pm
by eslavko
Hello...

I just wonder if I understand correctly.
from usbFunctionSetup I can send data in any length (from static buffer) just need to assign usbMsgPtr to right place and return sizeof(Buffer). As I try seems to work. But in opposite side is not that easy as I understand.

If the data is only 4 bytes in wValue and wIndex then is near same (just need to use/copy that) BUT if data is longer (wLength<>0) then I just wonder if the use of usbFunctionWrite is mandatory or the data can be read within usbFunctionSetup.

Thanks