]> git.donarmstrong.com Git - kiibohd-controller.git/commitdiff
Fixing Mac OSX freeze on wake-up bug
authorJacob Alexander <haata@kiibohd.com>
Sat, 7 Mar 2015 08:34:14 +0000 (00:34 -0800)
committerJacob Alexander <haata@kiibohd.com>
Sat, 7 Mar 2015 08:34:14 +0000 (00:34 -0800)
- CLEAR_FEATURE unset is currently causing the keyboarod to freeze
- Though not ideal, it seems harmless to ignore this USB Control Packet
- Tested working on a Mac Mini (Yosemite)

Output/pjrcUSB/arm/usb_dev.c

index c4c60b83c7b4dee9731c07d3b834458a9d40bd64..18e51b620ef3b9248474d53745a36c7b31253aca 100644 (file)
@@ -317,13 +317,17 @@ static void usb_setup()
                i = setup.wIndex & 0x7F;
                if ( i > NUM_ENDPOINTS || setup.wValue != 0 )
                {
-                       // TODO: do we need to handle IN vs OUT here?
                        endpoint0_stall();
                        return;
                }
-               (*(uint8_t *)(&USB0_ENDPT0 + setup.wIndex * 4)) &= ~0x02;
+               //(*(uint8_t *)(&USB0_ENDPT0 + setup.wIndex * 4)) &= ~0x02;
                // TODO: do we need to clear the data toggle here?
-               break;
+               //break;
+
+               // FIXME: Clearing causes keyboard to freeze, likely an invalid clear
+               // XXX: Ignoring seems to work, though this may not be the ideal behaviour -HaaTa
+               endpoint0_stall();
+               return;
        case 0x0302: // SET_FEATURE (endpoint)
                i = setup.wIndex & 0x7F;
                if ( i > NUM_ENDPOINTS || setup.wValue != 0 )