17 #if defined( USB_PRESENT ) && ( USB_COUNT == 1 )
19 #if defined( USB_HOST )
46 if ( ep->setup.wLength != 0 )
50 USBH_CtlReceiveData( ep, ep->setup.wLength );
51 ep->state = H_EP_DATA_IN;
56 USBH_CtlSendData( ep, ep->setup.wLength );
57 ep->state = H_EP_DATA_OUT;
61 USBH_CtlReceiveData( ep, 0 );
62 ep->state = H_EP_STATUS_IN;
75 if ( ( ep->setupErrCnt == 1 ) && ( ep->timeout != 0 ) )
77 USBH_CtlSendSetup( ep );
80 USBHEP_TransferDone( ep, result );
88 USBH_CtlSendData( ep, 0 );
89 ep->state = H_EP_STATUS_OUT;
92 USBHEP_TransferDone( ep, result );
100 USBH_CtlReceiveData( ep, 0 );
101 ep->state = H_EP_STATUS_IN;
104 USBHEP_TransferDone( ep, result );
110 case H_EP_STATUS_OUT :
111 USBHEP_TransferDone( ep, result );
130 USBHEP_TransferDone( ep, result );
148 ep->xferCompleted =
true;
149 ep->xferStatus = result;
150 ep->state = H_EP_IDLE;
159 ep->xferred = hcs[ hcnum ].xferred;
160 ep->remaining = hcs[ hcnum ].remaining;
162 hcs[ ep->hcIn ].idle =
true;
163 hcs[ ep->hcOut ].idle =
true;
165 if ( ep->setup.wLength == 0 )
172 hcnum = ep->in ? ep->hcIn : ep->hcOut;
177 hcs[ hcnum ].idle =
true;
178 ep->xferred = hcs[ hcnum ].xferred;
179 ep->remaining = hcs[ hcnum ].remaining;
182 if ( ep->xferCompleteCb )
184 callback = ep->xferCompleteCb;
185 ep->xferCompleteCb = NULL;
186 (callback)( result, ep->xferred, ep->remaining );
#define USB_SETUP_DIR_D2H
void USBTIMER_Stop(uint32_t id)
Stop a timer.
USB protocol stack library API for EFM32/EZR32.
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define USB_SETUP_DIR_MASK
int(* USB_XferCompleteCb_TypeDef)(USB_Status_TypeDef status, uint32_t xferred, uint32_t remaining)
USB transfer callback function.
USB_Status_TypeDef
USB transfer status enumerator.
USB protocol stack library API for EFM32/EZR32.
USB protocol stack library, low level USB peripheral access.
USB protocol stack library, internal type definitions.