summaryrefslogtreecommitdiff
path: root/src/portable/st
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-01-08 22:34:36 +0700
committerhathach <[email protected]>2021-01-08 22:34:36 +0700
commit6e6e6265e4feb797ddbd835dc1bee865d04219e6 (patch)
treeb2d1009368cfc9c2a0a0999b869fa22cf51eba95 /src/portable/st
parentfb896be201602ce38105a934d3a59886b46d1268 (diff)
use dcd_event_bus_reset() with speed to replace bus_signal
Diffstat (limited to 'src/portable/st')
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c2
-rw-r--r--src/portable/st/synopsys/dcd_synopsys.c9
2 files changed, 1 insertions, 10 deletions
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
index dc125a758..18f0bc8e1 100644
--- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
+++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
@@ -547,7 +547,7 @@ void dcd_int_handler(uint8_t rhport) {
// USBRST is start of reset.
clear_istr_bits(USB_ISTR_RESET);
dcd_handle_bus_reset();
- dcd_event_bus_signal(0, DCD_EVENT_BUS_RESET, true);
+ dcd_event_bus_reset(0, TUSB_SPEED_FULL, true);
return; // Don't do the rest of the things here; perhaps they've been cleared?
}
diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c
index 227c9ee61..4e385f691 100644
--- a/src/portable/st/synopsys/dcd_synopsys.c
+++ b/src/portable/st/synopsys/dcd_synopsys.c
@@ -565,15 +565,6 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
TU_ASSERT(epnum < EP_MAX);
- if (desc_edpt->bmAttributes.xfer == TUSB_XFER_ISOCHRONOUS)
- {
- TU_ASSERT(desc_edpt->wMaxPacketSize.size <= (get_speed(rhport) == TUSB_SPEED_HIGH ? 1024 : 1023));
- }
- else
- {
- TU_ASSERT(desc_edpt->wMaxPacketSize.size <= (get_speed(rhport) == TUSB_SPEED_HIGH ? 512 : 64));
- }
-
xfer_ctl_t * xfer = XFER_CTL_BASE(epnum, dir);
xfer->max_size = desc_edpt->wMaxPacketSize.size;
xfer->interval = desc_edpt->bInterval;