usbSetInterrupt3, does it work?
Posted: Mon Jul 05, 2010 5:10 am
- One additional interrupt- or bulk-in endpoint. This was endpoint 3 in
previous versions of this driver but can now be configured to any endpoint
number. You must define USB_CFG_HAVE_INTRIN_ENDPOINT3 in order to activate
this feature and call usbSetInterrupt3() to send interrupt/bulk data. The
endpoint number can be set with USB_CFG_EP3_NUMBER.
I have a need for this specifically.
Please note that the USB standard forbids bulk endpoints for low speed devices!
Most operating systems allow them anyway, but the AVR will spend 90% of the CPU
time in the USB interrupt polling for bulk data.
From what I know the host is capable of low and hi speeds. Lots of contradicting info on it. Its set up like so
Code: Select all
#if USB_CFG_HAVE_INTRIN_ENDPOINT /* endpoint descriptor for endpoint 1 */
7, /* sizeof(usbDescrEndpoint) */
USBDESCR_ENDPOINT, /* descriptor type = endpoint */
0x82, /* IN endpoint number 1 */
0x03, /* attrib: Interrupt endpoint */
32, 0, /* maximum packet size */
0x04, /* in ms */
Now its not a computer, but a have a version working on the PC I can test with. I can talk to either just fine with a packet size of 8. Since it is set up in bulk I must send more then 8 packets. Now from what I read I can do this with usbSetInterrupt3. However there are a grand total of one example(s) out there.
http://wayne.klinkerstein.m-faq.de/AVRUSB/Main.c
And this examples not only does not work , confused me as it hijacks 0x22 with SET_CONTROL_LINE_STATE. So its of no use to me, not that its a reputable example anyways. Would be great to see an office V-USB example, or at a minimum one on the examples page.
I tried a few ways to use this ...
#define USB_CFG_EP3_NUMBER 1
#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
and tried
while (!usbInterruptIsReady3()) usbPoll();
usbSetInterrupt3( XreportBuffer , ;
Do I need to use usbFunctionSetup to grab the notification? If so how. I tried rq->bRequest == 0x22 ( as suggested in that example ) but nothing caught. Where could I find an example that uses usbSetInterrupt3/usbInterruptIsReady3.