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
Russ Butler 2018-06-21 09:54:51 -05:00
parent 3657dab5db
commit a75b40a778
1 changed files with 1 additions and 13 deletions

View File

@ -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;
}