Mercurial > louis > kiibohd-controller
diff Output/pjrcUSB/arm/usb_dev.c @ 301:c8605539efef
Fixing Mac OSX freeze on wake-up bug
- 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)
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Sat, 07 Mar 2015 00:34:14 -0800 |
parents | d5bf41d7f7ef |
children | ac842066568a |
line wrap: on
line diff
--- a/Output/pjrcUSB/arm/usb_dev.c Fri Mar 06 23:37:09 2015 -0800 +++ b/Output/pjrcUSB/arm/usb_dev.c Sat Mar 07 00:34:14 2015 -0800 @@ -317,13 +317,17 @@ 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 )