mirror of
https://github.com/hathach/tinyusb.git
synced 2026-02-04 20:45:43 +00:00
Remove redundant EP reg clear
Signed-off-by: Zixun LI <admin@hifiphile.com>
This commit is contained in:
@ -183,14 +183,10 @@ bool dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
|
||||
FSDEV_REG->BTABLE = FSDEV_BTABLE_BASE;
|
||||
#endif
|
||||
|
||||
// Reset endpoints to disabled
|
||||
for (uint32_t i = 0; i < FSDEV_EP_COUNT; i++) {
|
||||
// This doesn't clear all bits since some bits are "toggle", but does set the type to DISABLED.
|
||||
ep_write(i, 0u, false);
|
||||
}
|
||||
|
||||
// Enable interrupts for device mode
|
||||
FSDEV_REG->CNTR |= USB_CNTR_RESETM | USB_CNTR_ESOFM | USB_CNTR_CTRM |
|
||||
USB_CNTR_SUSPM | USB_CNTR_WKUPM | USB_CNTR_PMAOVRM;
|
||||
USB_CNTR_SUSPM | USB_CNTR_WKUPM | USB_CNTR_PMAOVRM;
|
||||
|
||||
handle_bus_reset(rhport);
|
||||
|
||||
// Enable pull-up if supported
|
||||
|
||||
@ -207,11 +207,6 @@ bool hcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
|
||||
|
||||
FSDEV_REG->CNTR = USB_CNTR_HOST; // Enable USB in Host mode
|
||||
|
||||
// Reset channels to disabled
|
||||
for (uint32_t i = 0; i < FSDEV_EP_COUNT; i++) {
|
||||
ch_write(i, 0u, false);
|
||||
}
|
||||
|
||||
tu_memclr(&_hcd_data, sizeof(_hcd_data));
|
||||
|
||||
// Enable interrupts for host mode
|
||||
|
||||
Reference in New Issue
Block a user