mirror of https://github.com/ARMmbed/mbed-os.git
SiL USB: Correctly handle ep0 reset on Happy
Use correct function when resetting endpoint 0 (on stall etc) on Happy Gecko.pull/1287/head
parent
1eb719bc17
commit
088e451b7a
|
@ -920,7 +920,11 @@ void USBD_StallEp0()
|
||||||
USBDHAL_StallEp( ep ); /* Stall Ep0 IN */
|
USBDHAL_StallEp( ep ); /* Stall Ep0 IN */
|
||||||
ep->in = false; /* OUT for next SETUP */
|
ep->in = false; /* OUT for next SETUP */
|
||||||
USBDHAL_StallEp( ep ); /* Stall Ep0 OUT */
|
USBDHAL_StallEp( ep ); /* Stall Ep0 OUT */
|
||||||
|
#if !defined( USB_DOEP0INT_STUPPKTRCVD )
|
||||||
USBDHAL_ReenableEp0Setup( dev ); /* Prepare for next SETUP pkt. */
|
USBDHAL_ReenableEp0Setup( dev ); /* Prepare for next SETUP pkt. */
|
||||||
|
#else
|
||||||
|
USBDHAL_StartEp0Setup( dev );
|
||||||
|
#endif
|
||||||
ep->state = D_EP_IDLE;
|
ep->state = D_EP_IDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -260,7 +260,7 @@ void USBDEP_Ep0Handler( USBD_Device_TypeDef *device )
|
||||||
callback( USB_STATUS_OK, ep->xferred, ep->remaining );
|
callback( USB_STATUS_OK, ep->xferred, ep->remaining );
|
||||||
}
|
}
|
||||||
|
|
||||||
USBDHAL_ReenableEp0Setup(device);
|
USBDHAL_StartEp0Setup( dev );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue