Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
This repository was 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

Description

@obra

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;
     }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions