diff options
-rw-r--r-- | usb/dwc_otg.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usb/dwc_otg.h b/usb/dwc_otg.h index 5ad253f..09a76c0 100644 --- a/usb/dwc_otg.h +++ b/usb/dwc_otg.h @@ -91,13 +91,12 @@ class USB_otg : public USB_generic { } if(in) { - otg.dev_iep_reg[ep].DIEPTSIZ = size; - otg.dev_iep_reg[ep].DIEPCTL = epctl | (1 << 27) | (ep << 22); // SNAK - - } else { otg.reg.DIEPTXF[ep - 1] = (buf_end << 16) | (size >> 2); buf_end += (size >> 2); + otg.dev_iep_reg[ep].DIEPTSIZ = size; + otg.dev_iep_reg[ep].DIEPCTL = epctl | (1 << 27) | (ep << 22); // SNAK + } else { otg.dev_oep_reg[ep].DOEPTSIZ = (1 << 19) | size; otg.dev_oep_reg[ep].DOEPCTL = epctl | (1 << 26); // CNAK } |