diff options
| author | William D. Jones <[email protected]> | 2019-10-01 23:03:39 -0400 |
|---|---|---|
| committer | William D. Jones <[email protected]> | 2019-10-01 23:03:39 -0400 |
| commit | fad44c03c874ad5b278e41ab842e2fb36134ad2a (patch) | |
| tree | a0d36013f249f221a4a3bd2d8cf28982721a33e4 | |
| parent | b623e3023e7aaa8c9541f7d17a0c458667861cd4 (diff) | |
dcd_msp430x5xx: Fix TOGGLE bit behavior, clear stall when endpoint
opened due to reset potentially not resetting everything.
| -rw-r--r-- | src/portable/ti/msp430x5xx/dcd_msp430x5xx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c index 5e9fbf0f1..121dd03ac 100644 --- a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c +++ b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c @@ -260,9 +260,9 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt) ep_regs[SIZXY] = desc_edpt->wMaxPacketSize.size; ep_regs[BCTX] |= NAK; ep_regs[BBAX] = buf_base; - ep_regs[CNF] &= ~TOGGLE; // ISO xfers not supported on MSP430, + ep_regs[CNF] &= ~(TOGGLE | STALL); // ISO xfers not supported on MSP430, // so no need to gate DATA0/1 and frame - // behavior. + // behavior. Clear stall bit- see above comment. ep_regs[CNF] |= (UBME | USBIIE); USBKEYPID = USBKEY; @@ -313,8 +313,6 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t { ep_regs_t ep_regs = EP_REGS(epnum, dir); - ep_regs[CNF] &= ~TOGGLE; // Bulk and int begin on DATA0. - if(dir == TUSB_DIR_OUT) { ep_regs[BCTX] &= ~NAK; |
