From 07fd946dd7723b6f133dd6b288221b8a18e1e49e Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 22 Sep 2012 11:51:58 +0200 Subject: Configure TX FIFO on IN endpoints, not OUT. --- usb/dwc_otg.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'usb') 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 } -- cgit v1.2.3