diff options
| author | William D. Jones <[email protected]> | 2019-01-30 02:03:19 -0500 |
|---|---|---|
| committer | William D. Jones <[email protected]> | 2019-01-30 02:03:19 -0500 |
| commit | fcabc717d195e8598eff3bb7eea953958a397aed (patch) | |
| tree | d0cd406c912965f882a8d96deac3e4a2ab54c680 /src/portable | |
| parent | 8629f0c1089f15cd80c58e6e6dc804fd6710bf71 (diff) | |
Small cleanups (remove inaccurate comment, set EP0 max size based on speed).
Diffstat (limited to 'src/portable')
| -rw-r--r-- | src/portable/stm/stm32f4/dcd_stm32f4.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/portable/stm/stm32f4/dcd_stm32f4.c b/src/portable/stm/stm32f4/dcd_stm32f4.c index 3257d3c8d..b52caea90 100644 --- a/src/portable/stm/stm32f4/dcd_stm32f4.c +++ b/src/portable/stm/stm32f4/dcd_stm32f4.c @@ -112,12 +112,14 @@ static void end_of_reset(void) { if(enum_spd == 0x03) { // 64 bytes in_ep[0].DIEPCTL &= ~(0x03 << USB_OTG_DIEPCTL_MPSIZ_Pos); + xfer_status[0][TUSB_DIR_OUT].max_size = 64; + xfer_status[0][TUSB_DIR_IN].max_size = 64; } else { // 8 bytes in_ep[0].DIEPCTL |= (0x03 << USB_OTG_DIEPCTL_MPSIZ_Pos); + xfer_status[0][TUSB_DIR_OUT].max_size = 8; + xfer_status[0][TUSB_DIR_IN].max_size = 8; } - xfer_status[0][TUSB_DIR_OUT].max_size = 64; - xfer_status[0][TUSB_DIR_IN].max_size = 64; } @@ -444,8 +446,6 @@ void OTG_FS_IRQHandler(void) { dcd_event_bus_signal(0, DCD_EVENT_BUS_RESET, true); } - // Read a packet here; the RX FIFO must be cleared in order for the core - // to continue processing. So read into an intermediate buffer. if(int_status & USB_OTG_GINTSTS_RXFLVL) { USB_OTG_FS->GINTSTS = USB_OTG_GINTSTS_RXFLVL; @@ -549,8 +549,6 @@ void OTG_FS_IRQHandler(void) { } } } - - } #endif |
