mirror of https://github.com/ARMmbed/mbed-os.git
Revert "Fix Kinetis bug causing USB to get stuck"
Revert the commit "Fix Kinetis bug causing USB to get stuck sending" since this change causes stalls to be missed sometimes.pull/9768/head
parent
3657dab5db
commit
a75b40a778
|
|
@ -411,23 +411,11 @@ void USBPhyHw::endpoint_remove(usb_ep_t endpoint)
|
|||
|
||||
void USBPhyHw::endpoint_stall(usb_ep_t endpoint)
|
||||
{
|
||||
if (DESC_TO_LOG(endpoint) == 0) {
|
||||
USB0->ENDPOINT[DESC_TO_LOG(endpoint)].ENDPT |= USB_ENDPT_EPSTALL_MASK;
|
||||
} else {
|
||||
uint8_t dir = DESC_EP_IN(endpoint) ? TX : RX;
|
||||
uint32_t idx = EP_BDT_IDX(DESC_TO_LOG(endpoint), dir, 0);
|
||||
bdt[idx].info |= BD_OWN_MASK | BD_STALL_MASK;
|
||||
}
|
||||
USB0->ENDPOINT[DESC_TO_LOG(endpoint)].ENDPT |= USB_ENDPT_EPSTALL_MASK;
|
||||
}
|
||||
|
||||
void USBPhyHw::endpoint_unstall(usb_ep_t endpoint)
|
||||
{
|
||||
|
||||
if (DESC_TO_LOG(endpoint) != 0) {
|
||||
uint8_t dir = DESC_EP_IN(endpoint) ? TX : RX;
|
||||
uint32_t idx = EP_BDT_IDX(DESC_TO_LOG(endpoint), dir, 0);
|
||||
bdt[idx].info &= ~(BD_OWN_MASK | BD_STALL_MASK);
|
||||
}
|
||||
USB0->ENDPOINT[DESC_TO_LOG(endpoint)].ENDPT &= ~USB_ENDPT_EPSTALL_MASK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue