Skip to content

Commit 895d0d2

Browse files
ladyadadeanm1278
authored andcommitted
manually did arduino#88 and tested - fixes keyboardcontroller sluggishness
1 parent a4aed8f commit 895d0d2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

libraries/USBHost/src/Usb.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ uint32_t USBHost::InTransfer(EpInfo *pep, uint32_t nak_limit, uint8_t *nbytesptr
263263
}
264264
if(rcode) {
265265
uhd_freeze_pipe(pep->epAddr);
266-
//printf(">>>>>>>> Problem! dispatchPkt %2.2x\r\n", rcode);
266+
//printf(">>>>>>>> Problem! dispatchPkt %2.2x\r\n", rcode);
267267
return(rcode);// break; //should be 0, indicating ACK. Else return error code.
268268
}
269269
/* check for RCVDAVIRQ and generate error if not present */
@@ -425,15 +425,14 @@ uint32_t USBHost::dispatchPkt(uint32_t token, uint32_t epAddr, uint32_t nak_limi
425425

426426
//case hrNAK:
427427
if((USB->HOST.HostPipe[epAddr].PINTFLAG.reg & USB_HOST_PINTFLAG_TRFAIL) ) {
428-
USB->HOST.HostPipe[epAddr].PINTFLAG.reg = USB_HOST_PINTFLAG_TRFAIL;
429-
nak_count++;
430-
if(nak_limit && (nak_count == nak_limit)) {
431-
rcode = USB_ERRORFLOW;
432-
return (rcode);
433-
}
434-
}
428+
USB->HOST.HostPipe[epAddr].PINTFLAG.reg = USB_HOST_PINTFLAG_TRFAIL;
429+
nak_count++;
430+
if(nak_limit && (nak_count == nak_limit)) {
431+
rcode = USB_ERRORFLOW;
432+
return (rcode);
433+
}
434+
}
435435

436-
//case hrNAK:
437436
if( (usb_pipe_table[epAddr].HostDescBank[0].STATUS_BK.reg & USB_ERRORFLOW ) ) {
438437
nak_count++;
439438
if(nak_limit && (nak_count == nak_limit)) {

0 commit comments

Comments
 (0)