Skip to content

Commit 7578414

Browse files
AGlass0fMilkArto Kinnunen
authored andcommitted
Removed redundant virtual status transfer notifications.
1 parent 4b4364f commit 7578414

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -466,36 +466,14 @@ void USBPhyHw::process() {
466466
if(IS_IN_EP(usb_event.data.eptransfer.ep))
467467
{
468468
if((usb_event.data.eptransfer.ep & 0x7F) == 0)
469-
{
470469
events->ep0_in();
471-
// Check for pending virtual status transfer
472-
if(virtual_status_xfer_event)
473-
{
474-
// Notify the upper stack that the status transfer is done
475-
// as well at this point
476-
virtual_status_xfer_event = false;
477-
events->ep0_out();
478-
479-
}
480-
}
481470
else
482471
events->in((usb_ep_t) usb_event.data.eptransfer.ep);
483472
}
484473
else
485474
{
486475
if((usb_event.data.eptransfer.ep & 0x7F) == 0)
487-
{
488476
events->ep0_out();
489-
490-
// Check for pending virtual status transfer
491-
if(virtual_status_xfer_event)
492-
{
493-
// Notify the upper stack that the status transfer is done
494-
// as well at this point
495-
virtual_status_xfer_event = false;
496-
events->ep0_in();
497-
}
498-
}
499477
else
500478
events->out((usb_ep_t) usb_event.data.eptransfer.ep);
501479
}
@@ -591,8 +569,6 @@ nrf_drv_usbd_transfer_t* USBPhyHw::get_transfer_buffer(usb_ep_t endpoint) {
591569
nrf_drv_usbd_ep_t USBPhyHw::get_nordic_endpoint(usb_ep_t endpoint) {
592570
// Clear the most-significant-bit (input endpoint flag)
593571
uint8_t endpoint_num = (endpoint & ~(0x80));
594-
// Make sure it's within the valid endpoint range
595-
ASSERT(((0 <= endpoint_num) && (endpoint_num <= 8)));
596572
return (nrf_drv_usbd_ep_t) endpoint;
597573
}
598574

0 commit comments

Comments
 (0)