SiL USB: Correctly handle ep0 reset on Happy

Use correct function when resetting endpoint 0 (on stall etc)
on Happy Gecko.
pull/1287/head
Mikko Polojarvi 2015-07-27 15:04:03 +03:00
parent 1eb719bc17
commit 088e451b7a
2 changed files with 5 additions and 1 deletions

View File

@ -920,7 +920,11 @@ void USBD_StallEp0()
USBDHAL_StallEp( ep ); /* Stall Ep0 IN */
ep->in = false; /* OUT for next SETUP */
USBDHAL_StallEp( ep ); /* Stall Ep0 OUT */
#if !defined( USB_DOEP0INT_STUPPKTRCVD )
USBDHAL_ReenableEp0Setup( dev ); /* Prepare for next SETUP pkt. */
#else
USBDHAL_StartEp0Setup( dev );
#endif
ep->state = D_EP_IDLE;
}

View File

@ -260,7 +260,7 @@ void USBDEP_Ep0Handler( USBD_Device_TypeDef *device )
callback( USB_STATUS_OK, ep->xferred, ep->remaining );
}
USBDHAL_ReenableEp0Setup(device);
USBDHAL_StartEp0Setup( dev );
}
else
{