I need to transfer 64 bytes of Interrupt In transfer to PC via AVR. The function usbSetInterrupt is able to transfer only 8 bytes at a time.Using it 8 times to transfer 64 bytes does not seem to be a solution. There is a line in usbdrv.h "If you need to transfer more bytes, use a control read after the interrupt." in the description of usbSetInterrupt.
What is control read and how to transfer more interrupt in data using this method??
transfering more interrupt in data
-
- Posts: 16
- Joined: Tue Sep 18, 2012 2:30 pm
Re: transfering more interrupt in data
Hi Madara.
VUSB only implements low-speed USB. In low-speed USB the standard forces:
[...]
The maximum data payload size for low-speed devices is 8 bytes.
[...] (from: http://www.beyondlogic.org/usbnutshell/ ... #Interrupt)
So, you can not implent sth. the standard does not allow.
BR matrixstorm
VUSB only implements low-speed USB. In low-speed USB the standard forces:
[...]
The maximum data payload size for low-speed devices is 8 bytes.
[...] (from: http://www.beyondlogic.org/usbnutshell/ ... #Interrupt)
So, you can not implent sth. the standard does not allow.
BR matrixstorm
Re: transfering more interrupt in data
The maximum data payload size is 8 bytes for Control transfers as well.However we are able to transfer upto 254 bytes in VUSB by transferring them in a chuncks of 8 bytes in single control requests. I was wondering if this could be done for interrupt tranfers as there is a little description as "If you need to transfer more bytes, use a control read after the interrupt." in the description of usbSetInterrupt.
Re: transfering more interrupt in data
You can not transfer that much data in one go but of course you can do it by chunks in interrupt transfers.
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt( reportBuffer, 8 );
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt((void *)&reportBuffer + 8, 8 );
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt((void *)&reportBuffer + 16, 8 );
ect...
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt( reportBuffer, 8 );
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt((void *)&reportBuffer + 8, 8 );
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt((void *)&reportBuffer + 16, 8 );
ect...