82 #ifdef VBUS_SENSING_ENABLED 110 #ifdef VBUS_SENSING_ENABLED 112 USBD_DevDisconnected,
149 pdev->dev.class_cb = class_cb;
150 pdev->dev.usr_cb = usr_cb;
151 pdev->dev.usr_device = pDevice;
157 pdev->dev.usr_cb->Init();
223 ep = &pdev->dev.out_ep[0];
241 if((pdev->dev.class_cb->EP0_RxReady !=
NULL)&&
244 pdev->dev.class_cb->EP0_RxReady(pdev);
250 else if((pdev->dev.class_cb->DataOut !=
NULL)&&
253 pdev->dev.class_cb->DataOut(pdev, epnum);
276 ep = &pdev->dev.in_ep[0];
315 if((pdev->dev.class_cb->EP0_TxSent !=
NULL)&&
318 pdev->dev.class_cb->EP0_TxSent(pdev);
324 if (pdev->dev.test_mode == 1)
327 pdev->dev.test_mode = 0;
330 else if((pdev->dev.class_cb->DataIn !=
NULL)&&
333 pdev->dev.class_cb->DataIn(pdev, epnum);
381 pdev->dev.usr_cb->DeviceReset(pdev->
cfg.
speed);
396 pdev->dev.usr_cb->DeviceResumed();
397 pdev->dev.device_status = pdev->dev.device_old_status;
412 pdev->dev.device_old_status = pdev->dev.device_status;
415 pdev->dev.usr_cb->DeviceSuspended();
429 if(pdev->dev.class_cb->SOF)
431 pdev->dev.class_cb->SOF(pdev);
445 pdev->dev.class_cb->Init(pdev, cfgidx);
448 pdev->dev.usr_cb->DeviceConfigured();
461 pdev->dev.class_cb->DeInit(pdev, cfgidx);
473 pdev->dev.class_cb->IsoINIncomplete(pdev);
485 pdev->dev.class_cb->IsoOUTIncomplete(pdev);
489 #ifdef VBUS_SENSING_ENABLED 498 pdev->dev.usr_cb->DeviceConnected();
499 pdev->dev.connection_status = 1;
511 pdev->dev.usr_cb->DeviceDisconnected();
512 pdev->dev.class_cb->DeInit(pdev, 0);
513 pdev->dev.connection_status = 0;
USBD_Status USBD_StdItfReq(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_StdItfReq Handle standard usb interface requests.
static uint8_t USBD_IsoOUTIncomplete(USB_OTG_CORE_HANDLE *pdev)
USBD_IsoOUTIncomplete Handle iso out incomplete event.
Specific api's relative to the used hardware platform.
header file for the usbd_req.c file
USBD_Status USBD_CtlContinueRx(USB_OTG_CORE_HANDLE *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlContinueRx continue receive data on the ctl pipe.
USBD_Status USBD_CtlContinueSendData(USB_OTG_CORE_HANDLE *pdev, uint8_t *pbuf, uint16_t len)
USBD_CtlContinueSendData continue sending data on the ctl pipe.
static uint8_t USBD_IsoINIncomplete(USB_OTG_CORE_HANDLE *pdev)
USBD_IsoINIncomplete Handle iso in incomplete event.
static uint8_t USBD_DataOutStage(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
USBD_DataOutStage Handle data out stage.
static uint8_t USBD_RunTestMode(USB_OTG_CORE_HANDLE *pdev)
USBD_RunTestMode Launch test mode process.
uint32_t DCD_EP_Stall(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
Stall an endpoint.
USBD_Status USBD_ClrCfg(USB_OTG_CORE_HANDLE *pdev, uint8_t cfgidx)
USBD_ClrCfg Clear current configuration.
void USB_OTG_BSP_Init(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_BSP_Init Initilizes BSP configurations.
#define USB_OTG_SUSPENDED
#define USB_OTG_MAX_EP0_SIZE
Peripheral Device Interface Layer.
#define USB_OTG_EP0_DATA_OUT
__IO USB_OTG_DCTL_TypeDef SET_TEST_MODE
static uint8_t USBD_SOF(USB_OTG_CORE_HANDLE *pdev)
USBD_SOF Handle SOF event.
#define USB_OTG_WRITE_REG32(reg, value)
uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type)
Configure an EP.
#define USB_REQ_RECIPIENT_DEVICE
USBD_Status USBD_CtlSendStatus(USB_OTG_CORE_HANDLE *pdev)
USBD_CtlSendStatus send zero length packet on the ctl pipe.
USBD_Status USBD_DeInit(USB_OTG_CORE_HANDLE *pdev)
USBD_DeInit Re-Initialize the device library.
static uint8_t USBD_Reset(USB_OTG_CORE_HANDLE *pdev)
USBD_Reset Handle Reset event.
static uint8_t USBD_Suspend(USB_OTG_CORE_HANDLE *pdev)
USBD_Suspend Handle Suspend event.
static uint8_t USBD_DataInStage(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
USBD_DataInStage Handle data in stage.
uint32_t DCD_EP_PrepareRx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint16_t buf_len)
DCD_EP_PrepareRx.
header file for the usbd_ioreq.c file
USBD_DCD_INT_cb_TypeDef USBD_DCD_INT_cb
void USB_OTG_BSP_EnableInterrupt(USB_OTG_CORE_HANDLE *pdev)
USB_OTG_BSP_EnableInterrupt Enabele USB Global interrupt.
static uint8_t USBD_SetupStage(USB_OTG_CORE_HANDLE *pdev)
USBD_SetupStage Handle the setup stage.
USBD_Status USBD_CtlReceiveStatus(USB_OTG_CORE_HANDLE *pdev)
USBD_CtlReceiveStatus receive zero length packet on the ctl pipe.
#define USB_OTG_EP0_DATA_IN
#define USB_REQ_RECIPIENT_INTERFACE
USBD_Status USBD_StdEPReq(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_StdEPReq Handle standard usb endpoint requests.
void USBD_Init(USB_OTG_CORE_HANDLE *pdev, USB_OTG_CORE_ID_TypeDef coreID, USBD_DEVICE *pDevice, USBD_Class_cb_TypeDef *class_cb, USBD_Usr_cb_TypeDef *usr_cb)
USBD_Init Initializes the device stack and load the class driver.
void DCD_Init(USB_OTG_CORE_HANDLE *pdev, USB_OTG_CORE_ID_TypeDef coreID)
#define USB_OTG_CONFIGURED
USBD_Status USBD_SetCfg(USB_OTG_CORE_HANDLE *pdev, uint8_t cfgidx)
USBD_SetCfg Configure device and start the interface.
#define USB_REQ_RECIPIENT_ENDPOINT
Header file for usbd_core.c.
USBD_DCD_INT_cb_TypeDef * USBD_DCD_INT_fops
USBD_Status USBD_StdDevReq(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_StdDevReq Handle standard usb device requests.
void USBD_ParseSetupRequest(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_ParseSetupRequest Copy buffer into setup structure.
static uint8_t USBD_Resume(USB_OTG_CORE_HANDLE *pdev)
USBD_Resume Handle Resume event.