Skip to content

Commit 0e29638

Browse files
committed
Remove references to epAttribs
felis/USB_Host_Shield_2.0#185
1 parent f355d30 commit 0e29638

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

libraries/USBHost/src/Usb.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ uint32_t USBHost::ctrlReq(uint32_t addr, uint32_t ep, uint8_t bmReqType, uint8_t
143143
if (rcode)
144144
{
145145
TRACE_USBHOST(printf("/!\\ USBHost::ctrlReq : EP0 allocation error: %lu\r\n", rcode);)
146-
//USBTRACE2("\n\rUSBHost::ctrlReq : EP0 allocation error: ", rcode");
146+
//USBTRACE2("\n\rUSBHost::ctrlReq : EP0 allocation error: ", rcode");
147147
return rcode;
148148
}
149149

@@ -710,7 +710,8 @@ uint32_t USBHost::Configuring(uint32_t parent, uint32_t port, uint32_t lowspeed)
710710

711711
epInfo.epAddr = 0;
712712
epInfo.maxPktSize = 8;
713-
epInfo.epAttribs = 0;
713+
epInfo.bmSndToggle = 0;
714+
epInfo.bmRcvToggle = 0;
714715
epInfo.bmNakPower = USB_NAK_MAX_POWER;
715716

716717
//delay(2000);

libraries/USBHost/src/adk.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ ready(false) {
4545
for (uint32_t i = 0; i < ADK_MAX_ENDPOINTS; i++) {
4646
epInfo[i].epAddr = 0;
4747
epInfo[i].maxPktSize = (i) ? 0 : 8;
48-
epInfo[i].epAttribs = 0;
48+
epInfo[i].bmSndToggle = 0;
49+
epInfo[i].bmRcvToggle = 0;
4950
epInfo[i].bmNakPower = (i) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER;
5051
}//for(uint32_t i=0; i<ADK_MAX_ENDPOINTS; i++...
5152

@@ -221,15 +222,15 @@ uint32_t ADK::Init(uint32_t parent, uint32_t port, uint32_t lowspeed) {
221222
USBTRACE("\r\nEP0:");
222223
USBTRACE2("\r\nAddr: ", epInfo[0].epAddr);
223224
USBTRACE2("\r\nMax.pkt.size: ", epInfo[0].maxPktSize);
224-
USBTRACE2("\r\nAttr: ", epInfo[0].epAttribs);
225+
USBTRACE2("\r\nAttr: ", epInfo[0].bmNakPower);
225226
USBTRACE("\r\nEpout:");
226227
USBTRACE2("\r\nAddr: ", epInfo[epDataOutIndex].epAddr);
227228
USBTRACE2("\r\nMax.pkt.size: ", epInfo[epDataOutIndex].maxPktSize);
228-
USBTRACE2("\r\nAttr: ", epInfo[epDataOutIndex].epAttribs);
229+
USBTRACE2("\r\nAttr: ", epInfo[epDataOutIndex].bmNakPower);
229230
USBTRACE("\r\nEpin:");
230231
USBTRACE2("\r\nAddr: ", epInfo[epDataInIndex].epAddr);
231232
USBTRACE2("\r\nMax.pkt.size: ", epInfo[epDataInIndex].maxPktSize);
232-
USBTRACE2("\r\nAttr: ", epInfo[epDataInIndex].epAttribs);
233+
USBTRACE2("\r\nAttr: ", epInfo[epDataInIndex].bmNakPower);
233234

234235

235236
USBTRACE("\r\nConfiguration successful");
@@ -364,6 +365,8 @@ void ADK::EndpointXtract(uint32_t conf, uint32_t /* iface */, uint32_t /* alt */
364365
// Fill in the endpoint info structure
365366
epInfo[index].epAddr = (pep->bEndpointAddress & 0x0F);
366367
epInfo[index].maxPktSize = (uint8_t)pep->wMaxPacketSize;
368+
epInfo[index].bmSndToggle = 0;
369+
epInfo[index].bmRcvToggle = 0;
367370

368371
bNumEP++;
369372

libraries/USBHost/src/hidboot.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ void HIDBoot<BOOT_PROTOCOL>::Initialize() {
240240
for(int i = 0; i < totalEndpoints(BOOT_PROTOCOL); i++) {
241241
epInfo[i].epAddr = 0;
242242
epInfo[i].maxPktSize = (i) ? 0 : 8;
243-
epInfo[i].epAttribs = 0;
243+
epInfo[i].bmSndToggle = 0;
244+
epInfo[i].bmRcvToggle = 0;
244245
epInfo[i].bmNakPower = (i) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER;
245246
}
246247
bNumEP = 1;
@@ -535,7 +536,8 @@ void HIDBoot<BOOT_PROTOCOL>::EndpointXtract(uint32_t conf, uint32_t iface, uint3
535536
// Fill in the endpoint info structure
536537
epInfo[bNumEP].epAddr = (pep->bEndpointAddress & 0x0F);
537538
epInfo[bNumEP].maxPktSize = (uint8_t)pep->wMaxPacketSize;
538-
epInfo[bNumEP].epAttribs = 0;
539+
epInfo[bNumEP].bmSndToggle = 0;
540+
epInfo[bNumEP].bmRcvToggle = 0;
539541
epInfo[bNumEP].bmNakPower = USB_NAK_NOWAIT;
540542
bNumEP++;
541543

libraries/USBHost/src/hiduniversal.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ void HIDUniversal::Initialize() {
6060
for(uint8_t i = 0; i < totalEndpoints; i++) {
6161
epInfo[i].epAddr = 0;
6262
epInfo[i].maxPktSize = (i) ? 0 : 8;
63-
epInfo[i].epAttribs = 0;
63+
epInfo[i].bmSndToggle = 0;
64+
epInfo[i].bmRcvToggle = 0;
6465
epInfo[i].bmNakPower = (i) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER;
6566
}
6667
bNumEP = 1;
@@ -324,7 +325,8 @@ void HIDUniversal::EndpointXtract(uint32_t conf, uint32_t iface, uint32_t alt, u
324325
// Fill in the endpoint info structure
325326
epInfo[bNumEP].epAddr = (pep->bEndpointAddress & 0x0F);
326327
epInfo[bNumEP].maxPktSize = (uint8_t)pep->wMaxPacketSize;
327-
epInfo[bNumEP].epAttribs = 0;
328+
epInfo[bNumEP].bmSndToggle = 0;
329+
epInfo[bNumEP].bmRcvToggle = 0;
328330
epInfo[bNumEP].bmNakPower = USB_NAK_NOWAIT;
329331

330332
// Fill in the endpoint index list

libraries/USBHost/src/usbhub.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ qNextPollTime(0),
2828
bPollEnable(false) {
2929
epInfo[0].epAddr = 0;
3030
epInfo[0].maxPktSize = 8;
31-
epInfo[0].epAttribs = 0;
31+
epInfo[0].bmSndToggle = 0;
32+
epInfo[0].bmRcvToggle = 0;
3233
epInfo[0].bmNakPower = USB_NAK_MAX_POWER;
3334

3435
epInfo[1].epAddr = 1;
3536
epInfo[1].maxPktSize = 8; //kludge
36-
epInfo[1].epAttribs = 0;
37+
epInfo[1].bmSndToggle = 0;
38+
epInfo[1].bmRcvToggle = 0;
3739
epInfo[1].bmNakPower = USB_NAK_NOWAIT;
3840

3941
if(pUsb)

0 commit comments

Comments
 (0)