From e31ddf951f6dfc052e3387f5c52e671ff14115f0 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 22 Sep 2012 17:58:06 +0200 Subject: Add temporary workaround to toggle even/odd frame flag. --- usb/dwc_otg.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usb') 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; -- cgit v1.2.3