From b1ac5161757a2d97579a7a24507b87737c847d39 Mon Sep 17 00:00:00 2001 From: "Andrew J. Kroll" Date: Thu, 22 May 2014 01:33:01 -0400 Subject: [PATCH] Better/smaller EndpointXtract method, Removes buggy/unused/dead block of code. --- masstorage.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/masstorage.cpp b/masstorage.cpp index 19da7b19..90f76b3c 100644 --- a/masstorage.cpp +++ b/masstorage.cpp @@ -532,6 +532,20 @@ void BulkOnly::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t 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) index = epInterruptInIndex; else @@ -548,6 +562,7 @@ void BulkOnly::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t bNumEP++; PrintEndpointDescriptor(pep); +#endif } /**