mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Better/smaller EndpointXtract method, Removes buggy/unused/dead block of code.
This commit is contained in:
parent
7e826ab32b
commit
b1ac516175
1 changed files with 15 additions and 0 deletions
|
@ -532,6 +532,20 @@ void BulkOnly::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t
|
||||||
|
|
||||||
uint8_t index;
|
uint8_t index;
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
if((pep->bmAttributes & 0x02) == 2) {
|
||||||
|
index = ((pep->bEndpointAddress & 0x80) == 0x80) ? epDataInIndex : epDataOutIndex;
|
||||||
|
// Fill in the endpoint info structure
|
||||||
|
epInfo[index].epAddr = (pep->bEndpointAddress & 0x0F);
|
||||||
|
epInfo[index].maxPktSize = (uint8_t)pep->wMaxPacketSize;
|
||||||
|
epInfo[index].epAttribs = 0;
|
||||||
|
|
||||||
|
bNumEP++;
|
||||||
|
|
||||||
|
PrintEndpointDescriptor(pep);
|
||||||
|
|
||||||
|
}
|
||||||
|
#else
|
||||||
if((pep->bmAttributes & 0x03) == 3 && (pep->bEndpointAddress & 0x80) == 0x80)
|
if((pep->bmAttributes & 0x03) == 3 && (pep->bEndpointAddress & 0x80) == 0x80)
|
||||||
index = epInterruptInIndex;
|
index = epInterruptInIndex;
|
||||||
else
|
else
|
||||||
|
@ -548,6 +562,7 @@ void BulkOnly::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t
|
||||||
bNumEP++;
|
bNumEP++;
|
||||||
|
|
||||||
PrintEndpointDescriptor(pep);
|
PrintEndpointDescriptor(pep);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue