I took a stab at it, plan to do a bit more when I get a chance. So far I do not see any data coming out of sendDataUSB3. Just so that you see what I'm working with here is my config.
Let me know if you spot anything wrong.
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 + 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, /* IN endpoint number 1 */
//0x82, // bulk IN endpoint number 1
0x03, /* attrib: Interrupt endpoint */
//8, 0, /* maximum packet size */ // [needed for pc mode ]
32, 0, /* maximum packet size */ // [needed for xbox mode ]
0x04, /* in ms */
//the output.
7, /* sizeof(usbDescrEndpoint) */
5, /* descriptor type = endpoint */
0x02, /* out endpoint number 2 */
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
0x82, // bulk IN endpoint number 1
0x03, // attrib: Interrupt endpoint
32, 0, // maximum packet size
0x04,
#endif
Here are a few defines.
#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
#define USB_CFG_EP3_NUMBER 2
#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
I also tried using sendDataUSB3 on the PC with maximum packet size of 8 ( as you said 8 is needed for the PC ) and it two does not work.
I tried setting the end3 to
Code: Select all
#if USB_CFG_HAVE_INTRIN_ENDPOINT3
7, // sizeof(usbDescrEndpoint)
5, // descriptor type = endpoint
0x81, // bulk IN endpoint number 1
0x03, // attrib: Interrupt endpoint
8, 0, // maximum packet size
0x04,
#endif
- and did a usblyzer cap, and nothing sends.
also, I see you use a USB_CFG_INTR_POLL_INTERVAL pf 1, is that not a bit fast?
MackTruman, I'm not sure what exactly you are referring to? Is that directed to me or IvIePhisto . What wont work? The usbSetInterrupt3 function? Who's Code, USB-V ?
____update_____
After looking at usbLyzer some more I saw the out endpoint was in the way and the enpoint 3 was not showing up. So I tried
Code: Select all
#if USB_CFG_HAVE_INTRIN_ENDPOINT /* endpoint descriptor for endpoint 1 */
7, /* sizeof(usbDescrEndpoint) */
USBDESCR_ENDPOINT, /* descriptor type = endpoint */
0x81, /* IN endpoint number 1 */
//0x82, // bulk IN endpoint number 1
0x03, /* attrib: Interrupt endpoint */
8, 0, /* maximum packet size */ // [needed for pc mode ]
//32, 0, /* maximum packet size */ // [needed for xbox mode ]
0x04, /* in ms */
//the output.
/*
7, // sizeof(usbDescrEndpoint)
5, // descriptor type = endpoint
0x02, // out endpoint number 2
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
0x81, // bulk IN endpoint number 1
0x03, // attrib: Interrupt endpoint
8, 0, // maximum packet size
0x04,
#endif
Also with 82 on ep3, but still no luck.