mirror of
https://github.com/gdsports/USBHost_t36
synced 2024-11-21 16:45:04 -05:00
Impove handling of non-enumeration control transfers
This commit is contained in:
parent
252b9a2f24
commit
2423608e0f
@ -97,6 +97,12 @@ void USBHost::enumeration(const Transfer_t *transfer)
|
||||
//print(transfer);
|
||||
Device_t *dev = transfer->pipe->device;
|
||||
|
||||
// If a driver created this control transfer, allow it to process the result
|
||||
if (transfer->driver) {
|
||||
transfer->driver->control(transfer);
|
||||
return;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
// Within this large switch/case, "break" means we've done
|
||||
// some work, but more remains to be done in a different
|
||||
@ -220,12 +226,6 @@ void USBHost::enumeration(const Transfer_t *transfer)
|
||||
return;
|
||||
case 15: // control transfers for other stuff?
|
||||
// TODO: handle other standard control: set/clear feature, etc
|
||||
for (USBDriver *d = dev->drivers; d != NULL; d = d->next) {
|
||||
if (d->control(transfer)) {
|
||||
// this driver processed the control transfer reply
|
||||
return;
|
||||
}
|
||||
}
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user