mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Do not flip toggle value on Toggle Error
This commit is contained in:
parent
77575207c1
commit
a361b72680
1 changed files with 0 additions and 8 deletions
8
Usb.cpp
8
Usb.cpp
|
@ -172,8 +172,6 @@ uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bReque
|
||||||
|
|
||||||
rcode = InTransfer(pep, nak_limit, &read, dataptr);
|
rcode = InTransfer(pep, nak_limit, &read, dataptr);
|
||||||
if(rcode == hrTOGERR) {
|
if(rcode == hrTOGERR) {
|
||||||
// yes, we flip it wrong here so that next time it is actually correct!
|
|
||||||
pep->bmRcvToggle = (regRd(rHRSL) & bmSNDTOGRD) ? 0 : 1;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,9 +237,6 @@ uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, ui
|
||||||
#endif
|
#endif
|
||||||
rcode = dispatchPkt(tokIN, pep->epAddr, nak_limit); //IN packet to EP-'endpoint'. Function takes care of NAKS.
|
rcode = dispatchPkt(tokIN, pep->epAddr, nak_limit); //IN packet to EP-'endpoint'. Function takes care of NAKS.
|
||||||
if(rcode == hrTOGERR) {
|
if(rcode == hrTOGERR) {
|
||||||
// yes, we flip it wrong here so that next time it is actually correct!
|
|
||||||
pep->bmRcvToggle = (regRd(rHRSL) & bmRCVTOGRD) ? 0 : 1;
|
|
||||||
regWr(rHCTL, (pep->bmRcvToggle) ? bmRCVTOG1 : bmRCVTOG0); //set toggle value
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(rcode) {
|
if(rcode) {
|
||||||
|
@ -363,9 +358,6 @@ uint8_t USB::OutTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t nbytes, uint8
|
||||||
//return ( rcode);
|
//return ( rcode);
|
||||||
break;
|
break;
|
||||||
case hrTOGERR:
|
case hrTOGERR:
|
||||||
// yes, we flip it wrong here so that next time it is actually correct!
|
|
||||||
pep->bmSndToggle = (regRd(rHRSL) & bmSNDTOGRD) ? 0 : 1;
|
|
||||||
regWr(rHCTL, (pep->bmSndToggle) ? bmSNDTOG1 : bmSNDTOG0); //set toggle value
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto breakout;
|
goto breakout;
|
||||||
|
|
Loading…
Reference in a new issue