Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

BootKeyboard's getIdle and getProtocol haven't been ported to anything other than SAMD or AVR #85

Open
obra opened this issue May 26, 2022 · 0 comments

Comments

@obra
Copy link
Member

obra commented May 26, 2022

This breaks using the Keyboardio Model 100 in boot mode or if it's plugged into an intel mac before the mac is powered on.

cc @bjc

In theory, this patch should fix things, but it doesn't appear to:

modified: src/BootKeyboard/BootKeyboard.cpp
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -158,6 +158,8 @@ bool BootKeyboard_::setup(USBSetup& setup) {
 #ifdef ARDUINO_ARCH_SAM
       USBDevice.armSend(0, &protocol, 1);
 #endif
+      USB_SendControl(TRANSFER_RELEASE, &protocol, 1);
+// USB_Flush(0);
       return true;
     }
     if (request == HID_GET_IDLE) {
@@ -167,6 +169,10 @@ bool BootKeyboard_::setup(USBSetup& setup) {
 #endif
 #ifdef ARDUINO_ARCH_SAM
       USBDevice.armSend(0, &idle, 1);
+#endif
+#if ((!defined  ARDUINO_ARCH_SAM)  &&  (!defined __AVR__))
+      USB_SendControl(TRANSFER_RELEASE, &idle, 1);
+   USB_Flush(0);
 #endif
       return true;
     }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant