# HG changeset patch # User Jacob Alexander # Date 1444116244 25200 # Node ID fbe55b27dc023ab220ae91d6dee272ca1b9cb6bf # Parent 5f085e29a66cf0c682bb443b3eebc470f434ed45 Cleaning up CLEAR_FEATURE (endpoint) - Reverting old fix that no longer seems relevant after numerous recent USB fixes diff -r 5f085e29a66c -r fbe55b27dc02 Output/pjrcUSB/arm/usb_dev.c --- a/Output/pjrcUSB/arm/usb_dev.c Sun Oct 04 16:19:20 2015 -0700 +++ b/Output/pjrcUSB/arm/usb_dev.c Tue Oct 06 00:24:04 2015 -0700 @@ -330,27 +330,21 @@ endpoint0_stall(); return; - case 0x0102: // CLEAR_FEATURE (interface) + case 0x0102: // CLEAR_FEATURE (endpoint) i = setup.wIndex & 0x7F; if ( i > NUM_ENDPOINTS || setup.wValue != 0 ) { endpoint0_stall(); return; } - warn_print("CLEAR_FEATURE - Interface"); - //(*(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; - - // 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; + goto send; case 0x0300: // SET_FEATURE (device) case 0x0301: // SET_FEATURE (interface) // TODO: Currently ignoring, perhaps useful? -HaaTa - warn_print("SET_FEATURE"); + warn_print("SET_FEATURE - Device/Interface"); endpoint0_stall(); return;