Endless loop. usbInterruptIsReady3() usbSetInterrupt3()
Re: Endless loop. usbInterruptIsReady3() usbSetInterrupt3()
you switched you examples above. You put the 2 end points under your 1 example anyways I got what I needed to see. This is the correct way of dong so, now your issue is the same right, endless loop?
-
- Posts: 12
- Joined: Tue Dec 11, 2012 4:33 pm
Re: Endless loop. usbInterruptIsReady3() usbSetInterrupt3()
ulao wrote:now your issue is the same right, endless loop?
yes... same as my first message in topic.
Re: Endless loop. usbInterruptIsReady3() usbSetInterrupt3()
Well I gave it a try here with better success. I was able to added the 3rd and use the write with no loop. Though I didnt try the composite device just a normal device.
Here is what I used and it works great. With one issue.
my issue is
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt( reportBuffer, ; works
while (!usbInterruptIsReady3()){usbPoll(); } usbSetInterrupt3( reportBuffer, ; didnt not.
Again no loop, but I just could not receive from my pipe. Its more then likely an over site ill keep o nit for a bit tonight.
Here is what I used and it works great. With one issue.
Code: Select all
uchar my_usbDescriptorConfiguration[] = { /* USB configuration descriptor */
9, /* sizeof(usbDescriptorConfiguration): length of descriptor in bytes */
USBDESCR_CONFIG, /* descriptor type */
18 + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT3 + 7 + 9, 0,
/* total length of data returned (including inlined descriptors) */
1, /* number of interfaces in this configuration */
1, /* index of this configuration */
0, /* configuration name string index */
USB_CFG_IS_SELF_POWERED, /* attributes */
USB_CFG_MAX_BUS_POWER/2, /* max USB current in 2mA units */
/* interface descriptor follows inline: */
9, /* sizeof(usbDescrInterface): length of descriptor in bytes */
USBDESCR_INTERFACE, /* descriptor type */
0, /* index of this interface */
0, /* alternate setting for this interface */
USB_CFG_HAVE_INTRIN_ENDPOINT + USB_CFG_HAVE_INTRIN_ENDPOINT3, /* endpoints excl 0: number of endpoint descriptors to follow */
USB_CFG_INTERFACE_CLASS,
USB_CFG_INTERFACE_SUBCLASS,
USB_CFG_INTERFACE_PROTOCOL,
0, /* string index for interface */
9, /* sizeof(usbDescrHID): length of descriptor in bytes */
USBDESCR_HID, /* descriptor type: HID */
0x10, 0x01, /* BCD representation of HID version */
0x00, /* target country code */
0x01, /* number of HID Report (or other HID class) Descriptor infos to follow */
0x22, /* descriptor type: report */
USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH, 0, /* total length of report descriptor *///
//#endif
#if USB_CFG_HAVE_INTRIN_ENDPOINT /* endpoint descriptor for endpoint 1 */
7, /* sizeof(usbDescrEndpoint) */
USBDESCR_ENDPOINT, /* descriptor type = endpoint */
0x81, // bulk IN endpoint number 1
0x03, /* attrib: Interrupt endpoint */
8, 0, /* maximum packet size */
0x04, /* in ms*/
#endif
#if USB_CFG_HAVE_INTRIN_ENDPOINT3
7, // sizeof(usbDescrEndpoint)
5, // descriptor type = endpoint
(char)(0x80 | USB_CFG_EP3_NUMBER), // bulk IN endpoint number 1
0x03, // attrib: Interrupt endpoint
8, 0, // maximum packet size
0x04,
#endif
//the output.
7, // sizeof(usbDescrEndpoint)
5, // descriptor type = endpoint
0x02, // out endpoint number 2
0x03, // attrib: Interrupt endpoint
8, 0, // maximum packet size
USB_CFG_INTR_POLL_INTERVAL, // in ms
};
my issue is
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt( reportBuffer, ; works
while (!usbInterruptIsReady3()){usbPoll(); } usbSetInterrupt3( reportBuffer, ; didnt not.
Again no loop, but I just could not receive from my pipe. Its more then likely an over site ill keep o nit for a bit tonight.