Fix LPC1768 test failures

Reset endpoints when they are removed. This ensures buffers and the
data toggle bit get reset back to zero.
pull/9768/head
Russ Butler 2018-05-15 18:41:33 -05:00
parent 9efccb20eb
commit 044804200b
1 changed files with 3 additions and 0 deletions
usb/device/targets/TARGET_NXP

View File

@ -583,6 +583,9 @@ void USBPhyHw::endpoint_remove(usb_ep_t endpoint)
disableEndpointEvent(endpoint);
// reset this endpoint, including data toggle
SIEsetEndpointStatus(endpoint, 0);
LPC_USB->USBDevIntClr = EP_RLZED;
LPC_USB->USBReEp &= ~EP(endpoint);