Mercurial > louis > kiibohd-controller
comparison Output/pjrcUSB/arm/usb_dev.c @ 381:fbe55b27dc02
Cleaning up CLEAR_FEATURE (endpoint)
- Reverting old fix that no longer seems relevant after numerous recent USB fixes
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Tue, 06 Oct 2015 00:24:04 -0700 |
parents | 47f89f1bfdb7 |
children | 801e7628d977 |
comparison
equal
deleted
inserted
replaced
380:5f085e29a66c | 381:fbe55b27dc02 |
---|---|
328 // TODO: Currently ignoring, perhaps useful? -HaaTa | 328 // TODO: Currently ignoring, perhaps useful? -HaaTa |
329 warn_print("CLEAR_FEATURE - Device/Interface"); | 329 warn_print("CLEAR_FEATURE - Device/Interface"); |
330 endpoint0_stall(); | 330 endpoint0_stall(); |
331 return; | 331 return; |
332 | 332 |
333 case 0x0102: // CLEAR_FEATURE (interface) | 333 case 0x0102: // CLEAR_FEATURE (endpoint) |
334 i = setup.wIndex & 0x7F; | 334 i = setup.wIndex & 0x7F; |
335 if ( i > NUM_ENDPOINTS || setup.wValue != 0 ) | 335 if ( i > NUM_ENDPOINTS || setup.wValue != 0 ) |
336 { | 336 { |
337 endpoint0_stall(); | 337 endpoint0_stall(); |
338 return; | 338 return; |
339 } | 339 } |
340 warn_print("CLEAR_FEATURE - Interface"); | 340 (*(uint8_t *)(&USB0_ENDPT0 + setup.wIndex * 4)) &= ~0x02; |
341 //(*(uint8_t *)(&USB0_ENDPT0 + setup.wIndex * 4)) &= ~0x02; | |
342 // TODO: do we need to clear the data toggle here? | 341 // TODO: do we need to clear the data toggle here? |
343 //break; | 342 goto send; |
344 | |
345 // FIXME: Clearing causes keyboard to freeze, likely an invalid clear | |
346 // XXX: Ignoring seems to work, though this may not be the ideal behaviour -HaaTa | |
347 endpoint0_stall(); | |
348 return; | |
349 | 343 |
350 case 0x0300: // SET_FEATURE (device) | 344 case 0x0300: // SET_FEATURE (device) |
351 case 0x0301: // SET_FEATURE (interface) | 345 case 0x0301: // SET_FEATURE (interface) |
352 // TODO: Currently ignoring, perhaps useful? -HaaTa | 346 // TODO: Currently ignoring, perhaps useful? -HaaTa |
353 warn_print("SET_FEATURE"); | 347 warn_print("SET_FEATURE - Device/Interface"); |
354 endpoint0_stall(); | 348 endpoint0_stall(); |
355 return; | 349 return; |
356 | 350 |
357 case 0x0302: // SET_FEATURE (endpoint) | 351 case 0x0302: // SET_FEATURE (endpoint) |
358 i = setup.wIndex & 0x7F; | 352 i = setup.wIndex & 0x7F; |