usbFunctionSetup and usbFunctionWrite

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
eslavko
Rank 1
Rank 1
Posts: 36
Joined: Sat Dec 18, 2010 6:37 pm

usbFunctionSetup and usbFunctionWrite

Post by eslavko » Wed Dec 22, 2010 12:00 pm

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

Post Reply