Skip to content

Replace assignments to epAttribs #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions libraries/USBHost/src/Usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ uint32_t USBHost::ctrlReq(uint32_t addr, uint32_t ep, uint8_t bmReqType, uint8_t
if (rcode)
{
TRACE_USBHOST(printf("/!\\ USBHost::ctrlReq : EP0 allocation error: %lu\r\n", rcode);)
//USBTRACE2("\n\rUSBHost::ctrlReq : EP0 allocation error: ", rcode");
//USBTRACE2("\n\rUSBHost::ctrlReq : EP0 allocation error: ", rcode");
return rcode;
}

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

epInfo.epAddr = 0;
epInfo.maxPktSize = 8;
epInfo.epAttribs = 0;
epInfo.bmSndToggle = 0;
epInfo.bmRcvToggle = 0;
epInfo.bmNakPower = USB_NAK_MAX_POWER;

//delay(2000);
Expand Down
5 changes: 4 additions & 1 deletion libraries/USBHost/src/adk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ ready(false) {
for (uint32_t i = 0; i < ADK_MAX_ENDPOINTS; i++) {
epInfo[i].epAddr = 0;
epInfo[i].maxPktSize = (i) ? 0 : 8;
epInfo[i].epAttribs = 0;
epInfo[i].bmSndToggle = 0;
epInfo[i].bmRcvToggle = 0;
epInfo[i].bmNakPower = (i) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER;
}//for(uint32_t i=0; i<ADK_MAX_ENDPOINTS; i++...

Expand Down Expand Up @@ -364,6 +365,8 @@ void ADK::EndpointXtract(uint32_t conf, uint32_t /* iface */, uint32_t /* alt */
// Fill in the endpoint info structure
epInfo[index].epAddr = (pep->bEndpointAddress & 0x0F);
epInfo[index].maxPktSize = (uint8_t)pep->wMaxPacketSize;
epInfo[index].bmSndToggle = 0;
epInfo[index].bmRcvToggle = 0;

bNumEP++;

Expand Down
6 changes: 4 additions & 2 deletions libraries/USBHost/src/hidboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ void HIDBoot<BOOT_PROTOCOL>::Initialize() {
for(int i = 0; i < totalEndpoints(BOOT_PROTOCOL); i++) {
epInfo[i].epAddr = 0;
epInfo[i].maxPktSize = (i) ? 0 : 8;
epInfo[i].epAttribs = 0;
epInfo[i].bmSndToggle = 0;
epInfo[i].bmRcvToggle = 0;
epInfo[i].bmNakPower = (i) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER;
}
bNumEP = 1;
Expand Down Expand Up @@ -535,7 +536,8 @@ void HIDBoot<BOOT_PROTOCOL>::EndpointXtract(uint32_t conf, uint32_t iface, uint3
// Fill in the endpoint info structure
epInfo[bNumEP].epAddr = (pep->bEndpointAddress & 0x0F);
epInfo[bNumEP].maxPktSize = (uint8_t)pep->wMaxPacketSize;
epInfo[bNumEP].epAttribs = 0;
epInfo[bNumEP].bmSndToggle = 0;
epInfo[bNumEP].bmRcvToggle = 0;
epInfo[bNumEP].bmNakPower = USB_NAK_NOWAIT;
bNumEP++;

Expand Down
6 changes: 4 additions & 2 deletions libraries/USBHost/src/hiduniversal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ void HIDUniversal::Initialize() {
for(uint8_t i = 0; i < totalEndpoints; i++) {
epInfo[i].epAddr = 0;
epInfo[i].maxPktSize = (i) ? 0 : 8;
epInfo[i].epAttribs = 0;
epInfo[i].bmSndToggle = 0;
epInfo[i].bmRcvToggle = 0;
epInfo[i].bmNakPower = (i) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER;
}
bNumEP = 1;
Expand Down Expand Up @@ -324,7 +325,8 @@ void HIDUniversal::EndpointXtract(uint32_t conf, uint32_t iface, uint32_t alt, u
// Fill in the endpoint info structure
epInfo[bNumEP].epAddr = (pep->bEndpointAddress & 0x0F);
epInfo[bNumEP].maxPktSize = (uint8_t)pep->wMaxPacketSize;
epInfo[bNumEP].epAttribs = 0;
epInfo[bNumEP].bmSndToggle = 0;
epInfo[bNumEP].bmRcvToggle = 0;
epInfo[bNumEP].bmNakPower = USB_NAK_NOWAIT;

// Fill in the endpoint index list
Expand Down
6 changes: 4 additions & 2 deletions libraries/USBHost/src/usbhub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ qNextPollTime(0),
bPollEnable(false) {
epInfo[0].epAddr = 0;
epInfo[0].maxPktSize = 8;
epInfo[0].epAttribs = 0;
epInfo[0].bmSndToggle = 0;
epInfo[0].bmRcvToggle = 0;
epInfo[0].bmNakPower = USB_NAK_MAX_POWER;

epInfo[1].epAddr = 1;
epInfo[1].maxPktSize = 8; //kludge
epInfo[1].epAttribs = 0;
epInfo[1].bmSndToggle = 0;
epInfo[1].bmRcvToggle = 0;
epInfo[1].bmNakPower = USB_NAK_NOWAIT;

if(pUsb)
Expand Down