PaulStoffregen / USBHost_t36

USB Host Library for Teensy 3.6 and 4.0
171 stars 87 forks source link

Keyboard - Make always use HID no longer: public usbdriver #97

Closed KurtE closed 2 years ago

KurtE commented 2 years ago

Changed the Keyboard to no longer be a top-level driver, but always rely on USBHidParser (or BT) to talk to the device.

One side effect of this, is I had to update several of the examples, that check for devices coming and going and remove them from the devices list and make sure they are on the HID list. Like Mouse.

Note: this also allowed me to remove the special case from HID.cpp to not shy away from claiming boot keyboard.

Also now with this, setup, the Problem Gigabyte keyboard works without forcing it to go into boot mode. Although still does not resolve the issue that it faults the teensy some of the time... Nullptr for pipe in transfer struct when error condition causes code to walk that list.

Also added support for N-key rollover keyboards. That either work like that Gigabyte, or like Mike Aurus Gigabyte or my ReDragon one which after 6 keys pressed, it then switches to N key rollover messages for additional keys.

Lots more details up on the thread: https://forum.pjrc.com/threads/71037-USBHost-Testing-Keyboard-object-not-top-level-object-instead-USBHIDParser

@mjs513 and I have been working on this update as well as testing.

mjs513 commented 2 years ago

@PaulStoffregen @KurtE Just to confirm the changes work for my two keyboards that I was testing with - the Gigabyte Aorus and RII wireless keyboard.

Also just to confirm all these changes were tested using the new toolchain (11.3.1) and we didn't run into any issues other than was already posted for USBHost and fixed.