diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-12-11 17:33:56 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2012-12-11 17:39:45 +0100 |
commit | 8df0bd6997b6c32e93cae81438d0fe97066d9099 (patch) | |
tree | fe38d66b9428b86a309a992e6c393007ff76b6d5 | |
parent | 7adcd98d562a0c0b6809e0df5772977c985c2cee (diff) |
Corrected FIFO buffer size and offset.
-rw-r--r-- | usb/dwc_otg.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usb/dwc_otg.h b/usb/dwc_otg.h index cf4e8d7..636173b 100644 --- a/usb/dwc_otg.h +++ b/usb/dwc_otg.h @@ -91,7 +91,7 @@ class USB_otg : public USB_generic { otg.reg.GRXFSIZ = rxfifo_size >> 2; buf_end = rxfifo_size >> 2; - otg.reg.DIEPTXF0 = (buf_end << 16) | (64 >> 2); + otg.reg.DIEPTXF0 = ((64 >> 2) << 16) | buf_end; buf_end += (64 >> 2); otg.dev_iep_reg[ep].DIEPTSIZ = size; @@ -104,8 +104,8 @@ class USB_otg : public USB_generic { } if(in) { - otg.reg.DIEPTXF[ep - 1] = (buf_end << 16) | (size >> 2); - buf_end += (size >> 2); + otg.reg.DIEPTXF[ep - 1] = ((size >> 2) << 16) | buf_end; + buf_end += size >> 2; otg.dev_iep_reg[ep].DIEPTSIZ = size; otg.dev_iep_reg[ep].DIEPCTL = epctl | (1 << 27) | (ep << 22); // SNAK |