KurtE
Senior Member+
Thanks @defragster and @tni!
I am looking at trying to handle the Teensy configured as an USB mouse as a mouse to the T3.6...
The first issue, is the USBHost code is not currently claiming the Mouse. This is because it is not marked as a Boot device nor as mouse.
From ...cores\teensy3\usb_desc.c
Again as you can see it is not setup as boot device...
Currently the USBHost mouse claim code checks these values:
And bails from trying to claim it... So the mouse does not work...
I obviously may know enough here... But how does Windows know that this is a mouse? As I can plug it in to my PC and with the Triangle example sketch, my mouse moves itself around in a triangle pattern.
Suggestions?
I am looking at trying to handle the Teensy configured as an USB mouse as a mouse to the T3.6...
The first issue, is the USBHost code is not currently claiming the Mouse. This is because it is not marked as a Boot device nor as mouse.
From ...cores\teensy3\usb_desc.c
Code:
#ifdef MOUSE_INTERFACE
// interface descriptor, USB spec 9.6.5, page 267-269, Table 9-12
9, // bLength
4, // bDescriptorType
MOUSE_INTERFACE, // bInterfaceNumber
0, // bAlternateSetting
1, // bNumEndpoints
[COLOR="#FF0000"] 0x03, // bInterfaceClass (0x03 = HID)
0x00, // bInterfaceSubClass (0x01 = Boot)
0x00, // bInterfaceProtocol (0x02 = Mouse)[/COLOR]
0, // iInterface
// HID interface descriptor, HID 1.11 spec, section 6.2.1
9, // bLength
0x21, // bDescriptorType
0x11, 0x01, // bcdHID
0, // bCountryCode
1, // bNumDescriptors
0x22, // bDescriptorType
LSB(sizeof(mouse_report_desc)), // wDescriptorLength
MSB(sizeof(mouse_report_desc)),
// endpoint descriptor, USB spec 9.6.6, page 269-271, Table 9-13
7, // bLength
5, // bDescriptorType
MOUSE_ENDPOINT | 0x80, // bEndpointAddress
0x03, // bmAttributes (0x03=intr)
MOUSE_SIZE, 0, // wMaxPacketSize
MOUSE_INTERVAL, // bInterval
#endif // MOUSE_INTERFACE
Currently the USBHost mouse claim code checks these values:
Code:
if (descriptors[5] != 3) return false; // bInterfaceClass, 3 = HID
if (descriptors[6] != 1) return false; // bInterfaceSubClass, 1 = Boot Device
if (descriptors[7] != 2) return false; // bInterfaceProtocol, 2 = Mouse
I obviously may know enough here... But how does Windows know that this is a mouse? As I can plug it in to my PC and with the Triangle example sketch, my mouse moves itself around in a triangle pattern.
Suggestions?