mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-18 11:42:25 +00:00
Small cleanups (remove inaccurate comment, set EP0 max size based on speed).
This commit is contained in:
parent
8629f0c108
commit
fcabc717d1
@ -112,12 +112,14 @@ static void end_of_reset(void) {
|
|||||||
if(enum_spd == 0x03) {
|
if(enum_spd == 0x03) {
|
||||||
// 64 bytes
|
// 64 bytes
|
||||||
in_ep[0].DIEPCTL &= ~(0x03 << USB_OTG_DIEPCTL_MPSIZ_Pos);
|
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 {
|
} else {
|
||||||
// 8 bytes
|
// 8 bytes
|
||||||
in_ep[0].DIEPCTL |= (0x03 << USB_OTG_DIEPCTL_MPSIZ_Pos);
|
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);
|
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) {
|
if(int_status & USB_OTG_GINTSTS_RXFLVL) {
|
||||||
USB_OTG_FS->GINTSTS = USB_OTG_GINTSTS_RXFLVL;
|
USB_OTG_FS->GINTSTS = USB_OTG_GINTSTS_RXFLVL;
|
||||||
|
|
||||||
@ -549,8 +549,6 @@ void OTG_FS_IRQHandler(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user