Removed redundant virtual status transfer notifications.

pull/11023/head
George Beckstein 2019-03-14 16:39:44 -04:00 committed by Evelyne Donnaes
parent 036b5b2aa8
commit d0a08076ae
1 changed files with 0 additions and 24 deletions

View File

@ -466,36 +466,14 @@ void USBPhyHw::process() {
if(IS_IN_EP(usb_event.data.eptransfer.ep)) if(IS_IN_EP(usb_event.data.eptransfer.ep))
{ {
if((usb_event.data.eptransfer.ep & 0x7F) == 0) if((usb_event.data.eptransfer.ep & 0x7F) == 0)
{
events->ep0_in(); events->ep0_in();
// Check for pending virtual status transfer
if(virtual_status_xfer_event)
{
// Notify the upper stack that the status transfer is done
// as well at this point
virtual_status_xfer_event = false;
events->ep0_out();
}
}
else else
events->in((usb_ep_t) usb_event.data.eptransfer.ep); events->in((usb_ep_t) usb_event.data.eptransfer.ep);
} }
else else
{ {
if((usb_event.data.eptransfer.ep & 0x7F) == 0) if((usb_event.data.eptransfer.ep & 0x7F) == 0)
{
events->ep0_out(); events->ep0_out();
// Check for pending virtual status transfer
if(virtual_status_xfer_event)
{
// Notify the upper stack that the status transfer is done
// as well at this point
virtual_status_xfer_event = false;
events->ep0_in();
}
}
else else
events->out((usb_ep_t) usb_event.data.eptransfer.ep); events->out((usb_ep_t) usb_event.data.eptransfer.ep);
} }
@ -591,8 +569,6 @@ nrf_drv_usbd_transfer_t* USBPhyHw::get_transfer_buffer(usb_ep_t endpoint) {
nrf_drv_usbd_ep_t USBPhyHw::get_nordic_endpoint(usb_ep_t endpoint) { nrf_drv_usbd_ep_t USBPhyHw::get_nordic_endpoint(usb_ep_t endpoint) {
// Clear the most-significant-bit (input endpoint flag) // Clear the most-significant-bit (input endpoint flag)
uint8_t endpoint_num = (endpoint & ~(0x80)); uint8_t endpoint_num = (endpoint & ~(0x80));
// Make sure it's within the valid endpoint range
ASSERT(((0 <= endpoint_num) && (endpoint_num <= 8)));
return (nrf_drv_usbd_ep_t) endpoint; return (nrf_drv_usbd_ep_t) endpoint;
} }