mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-07 05:54:11 +08:00
dcd_da1469x: Re-enable RX after resume
Going to suspend states disable reception on non-0 RX endpoints. Now when USB resume condition is detected, all RX endpoints with pending transfers are resumed.
This commit is contained in:
parent
ae4d901d83
commit
7b078367e8
@ -733,6 +733,15 @@ static void handle_alt_ev(void)
|
|||||||
set_nfsr(NFSR_NODE_OPERATIONAL);
|
set_nfsr(NFSR_NODE_OPERATIONAL);
|
||||||
USB->USB_ALTMSK_REG = USB_USB_ALTMSK_REG_USB_M_RESET_Msk |
|
USB->USB_ALTMSK_REG = USB_USB_ALTMSK_REG_USB_M_RESET_Msk |
|
||||||
USB_USB_ALTMSK_REG_USB_M_SD3_Msk;
|
USB_USB_ALTMSK_REG_USB_M_SD3_Msk;
|
||||||
|
// Re-enable reception of endpoint with pending transfer
|
||||||
|
for (int epnum = 1; epnum <= 3; ++epnum)
|
||||||
|
{
|
||||||
|
xfer_ctl_t * xfer = XFER_CTL_BASE(epnum, TUSB_DIR_OUT);
|
||||||
|
if (xfer->total_len > xfer->transferred)
|
||||||
|
{
|
||||||
|
start_rx_packet(xfer);
|
||||||
|
}
|
||||||
|
}
|
||||||
dcd_event_bus_signal(0, DCD_EVENT_RESUME, true);
|
dcd_event_bus_signal(0, DCD_EVENT_RESUME, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user