summaryrefslogtreecommitdiff
path: root/usb
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2012-09-22 17:58:06 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2012-09-22 17:58:06 +0200
commite31ddf951f6dfc052e3387f5c52e671ff14115f0 (patch)
tree152013747f12e9fe69bef8e4fd66c0fb286c228c /usb
parenteaf304f02a234171c2b994138f1bc54338dcd975 (diff)
Add temporary workaround to toggle even/odd frame flag.
Diffstat (limited to 'usb')
-rw-r--r--usb/dwc_otg.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/usb/dwc_otg.h b/usb/dwc_otg.h
index ccfaf03..c27a91e 100644
--- a/usb/dwc_otg.h
+++ b/usb/dwc_otg.h
@@ -53,8 +53,13 @@ class USB_otg : public USB_generic {
(void)otg.fifo[0].reg;
}
+ // FIXME: Temporary workaround.
if(type == (0x2 << 17) && ep != 0) {
- otg.dev_oep_reg[ep].DOEPCTL |= (1 << 31) | (1 << 26); // CNAK
+ if(otg.dev_oep_reg[ep].DOEPCTL & (1 << 16)) {
+ otg.dev_oep_reg[ep].DOEPCTL |= (1 << 28) | (1 << 26);
+ } else {
+ otg.dev_oep_reg[ep].DOEPCTL |= (1 << 29) | (1 << 26);
+ }
}
rxfifo_bytes = 0;