![]() |
![]() |
DWC3 device controller driver. This is the lowest layer driver which interacts directly with the hardware. More...
Functions | |
| uint32_t | usbDwcDcdGetEvntCount (usbDwcDcdDevice_t *dwc3, uint32_t evntId) |
| This API returns the number of events for a selected buffer. More... | |
| void | usbDwcDcdSetupEvntBuf (usbDwcDcdDevice_t *dwc3, usbDwcDcdEvnt_t *pUsbEvnt, uint32_t evntSize, uint32_t count, uint32_t eventId) |
| Setup Event buffer required by the device control driver. More... | |
| void | usbDwcDcdCoreInit (usbDwcDcdDevice_t *dwc3) |
| USB DWC3 device controller drive core reset API. More... | |
| void | usbDwcDcdRunDEpCmd (usbDwcDcdDevice_t *dwc3, uint32_t phEpId, usbDEpCmdType_t pDEpCmdType, usbDwcDcdDEpCmdParms_t *pDEpCmdParm, int32_t rscIdx, uint8_t *pStatus) |
| This API is used to run Device endpoint command. More... | |
| void | usbDwcDcdRunSetupXfer (usbDwcDcdDevice_t *dwc3) |
| This API prepare a buffer for setup packet, initialise a setup TRB and starts the transfer. More... | |
| void | usbDwcDcdRunXferSingle (usbDwcDcdDevice_t *dwc3, uint32_t phEpId, usbDEpTrb_t *pTrb, void *pBuf, uint32_t bufSize, usbDwcDcdTrbCtrl_t xferType) |
| Run a start transfer command for single TRB. More... | |
| void | usbDwcDcdStartXfer (usbDwcDcdDevice_t *dwc3, uint32_t phEpId, usbDEpTrb_t *pDEpTrb) |
| Runs a start transfer core command with the provided transfer descriptor. More... | |
| void | usbDwcDcdRstEvntHandler (usbDwcDcdDevice_t *dwc3) |
| Perform the core operations required on receiving USB reset Event. More... | |
| void | usbDwcDcdCnctDoneEvntHandler (usbDwcDcdDevice_t *dwc3) |
| Perform the operations required on connect done event. More... | |
| void | usbDwcDcdEp0EvntHandler (usbDwcDcdDevice_t *dwc3, usbDwcDcdEvnt_t *usbDwcDcdEvnt) |
| EP0 interrupt handler(Default control endpoint) All other endpoint interrupts are handled separetely. More... | |
| void | usbDwcDcdEpEvntHandler (usbDwcDcdDevice_t *dwc3, usbDwcDcdEvnt_t *usbDwcDcdEvnt) |
| usb endpoint event handler which handles the various endpoint events of the DWC3 controler. More... | |
| void | usbDwcDcdDevEvntHandler (usbDwcDcdDevice_t *dwc3, usbDwcDcdEvnt_t *usbDwcDcdEvnt) |
| usb device event handler which handler the various events of the DWC3 controller. More... | |
| void | usbDwcDcdSetEpStall (usbDwcDcdDevice_t *dwc3, uint32_t phEpId, uint32_t flag) |
| This function sets or clear endpoint stall. More... | |
| void | usbDwcDcdSetConfiguration (usbDwcDcdDevice_t *dwc3) |
| This API is called when the set configuration request comes from the host driver. More... | |
| static usbDwcDcdDEpCmdParms_t dEpCmdParm | __attribute__ ((aligned(32U))) |
| usb endpoint command parameters More... | |
| uint32_t | USBDwcDcdInit (struct usbDcd *pDcdObject) |
| USB DWC3 device controller driver core init API. More... | |
| uint32_t | USBDwcDcdConfigDevChara (struct usbDcd *pDcdObject, usbDevChara_t *pDevCharecteristic) |
| This API sets the device characteristics. More... | |
| uint32_t | USBDwcDcdEp0Req (struct usbDcd *pDcdObject, usbEndpt0Request_t req) |
| Endpoint 0 request for control endpoint. More... | |
| uint32_t | USBDwcDcdEpReq (struct usbDcd *pDcdObject, usbEndptRequest_t req) |
| Endpoint request for control bulk and isoch transfers for all endpoints other than endpoint 0. More... | |
| uint32_t | USBDwcDcdIntrHandler (usbDwcDcdDevice_t *dwc3) |
| USB DWC3 device interrupt handler. This will get all the device and endpoint events for all the endpoints. More... | |
DWC3 device controller driver. This is the lowest layer driver which interacts directly with the hardware.
|
static |
usb endpoint command parameters
Control data buffer.
USB event buffer.
TRB for bulk out transfers.
TRB for bulk in transfers.
TRB for control status commands.
TRB for transfer of control data.
| void usbDwcDcdCnctDoneEvntHandler | ( | usbDwcDcdDevice_t * | dwc3 | ) |
Perform the operations required on connect done event.
| dwc3 | Pointer to the dwc3 device object |
| uint32_t USBDwcDcdConfigDevChara | ( | usbDcd_t * | pDcdObject, |
| usbDevChara_t * | pDevCharacteristic | ||
| ) |
This API sets the device characteristics.
| pDcdObject | pointer to the USB device control object. |
| pDevCharacteristic | pointer to the device characteristics structure. |
| void usbDwcDcdCoreInit | ( | usbDwcDcdDevice_t * | dwc3 | ) |
USB DWC3 device controller drive core reset API.
| dwc3 | pointer to the dwc3 device object. |
| void usbDwcDcdDevEvntHandler | ( | usbDwcDcdDevice_t * | dwc3, |
| usbDwcDcdEvnt_t * | usbDwcDcdEvnt | ||
| ) |
usb device event handler which handler the various events of the DWC3 controller.
| dwc3 | pointer to the dwc3 device object |
| usbDwcDcdEvnt | pointer to the DWC3 device event which has occured. |
More events can be added when required
| void usbDwcDcdEp0EvntHandler | ( | usbDwcDcdDevice_t * | dwc3, |
| usbDwcDcdEvnt_t * | usbDwcDcdEvnt | ||
| ) |
EP0 interrupt handler(Default control endpoint) All other endpoint interrupts are handled separetely.
| dwc3 | pointer to the dwc3 device object |
| usbDwcDcdEvnt | The event which is to be processed |
| uint32_t USBDwcDcdEp0Req | ( | usbDcd_t * | pDcdObject, |
| usbEndpt0Request_t | req | ||
| ) |
Endpoint 0 request for control endpoint.
| pDcdObject | pointer to the USB device control object. |
| req | USB request which needs to be handled for endpoint 0 |
| void usbDwcDcdEpEvntHandler | ( | usbDwcDcdDevice_t * | dwc3, |
| usbDwcDcdEvnt_t * | usbDwcDcdEvnt | ||
| ) |
usb endpoint event handler which handles the various endpoint events of the DWC3 controler.
| dwc3 | pointer to the dwc3 device object. |
| usbDwcDcdEvnt | pointer to the DWC3 endpoint event which has occured. |
| uint32_t USBDwcDcdEpReq | ( | usbDcd_t * | pDcdObject, |
| usbEndptRequest_t | req | ||
| ) |
Endpoint request for control bulk and isoch transfers for all endpoints other than endpoint 0.
| pDcdObject | pointer to the USB device control object. |
| req | USB request which needs to be handled for endpoint other than endpoint 0. |
| uint32_t usbDwcDcdGetEvntCount | ( | usbDwcDcdDevice_t * | dwc3, |
| uint32_t | evntId | ||
| ) |
This API returns the number of events for a selected buffer.
| dwc3 | pointer to the dwc3 device object. |
| evntId | ID of the event buffer. |
| uint32_t USBDwcDcdInit | ( | usbDcd_t * | pDcdObject | ) |
USB DWC3 device controller driver core init API.
| pDcdObject | pointer to the USB device control driver object |
| uint32_t USBDwcDcdIntrHandler | ( | usbDwcDcdDevice_t * | dwc3 | ) |
USB DWC3 device interrupt handler. This will get all the device and endpoint events for all the endpoints.
| dwc3 | pointer to the dwc3 object |
| void usbDwcDcdRstEvntHandler | ( | usbDwcDcdDevice_t * | dwc3 | ) |
Perform the core operations required on receiving USB reset Event.
| dwc3 | pointer to the dwc3 device object |
| void usbDwcDcdRunDEpCmd | ( | usbDwcDcdDevice_t * | dwc3, |
| uint32_t | phEpId, | ||
| usbDEpCmdType_t | pDEpCmdType, | ||
| usbDwcDcdDEpCmdParms_t * | pDEpCmdParm, | ||
| int32_t | rscIdx, | ||
| uint8_t * | pStatus | ||
| ) |
This API is used to run Device endpoint command.
| dwc3 | pointer to the dwc3 device object |
| phEpId | Id of the physical endpoint |
| usbDEpCmd | Endpoint command to be issued |
| pDEpCmdParm | Endpoint command parameters |
| rscIdx | Resource Idx value for Set New config command 0 for RSCIDX = 0 2 for RSCIDX = 2 -1 Don't Care |
| void usbDwcDcdRunSetupXfer | ( | usbDwcDcdDevice_t * | dwc3 | ) |
This API prepare a buffer for setup packet, initialise a setup TRB and starts the transfer.
| dwc3 | pointer to the dwc3 device object. |
| void usbDwcDcdRunXferSingle | ( | usbDwcDcdDevice_t * | dwc3, |
| uint32_t | phEpId, | ||
| usbDEpTrb_t * | pTrb, | ||
| void * | pBuf, | ||
| uint32_t | bufSize, | ||
| usbDwcDcdTrbCtrl_t | xferType | ||
| ) |
Run a start transfer command for single TRB.
| dwc3 | pointer to the dwc3 device object |
| phEpId | target physical endpoint ID |
| pTrb | pointer to the TRB |
| pBuf | pointer to the data buffer |
| bufSize | Size of the data buffer |
| xferType | Transfer type |
| void usbDwcDcdSetConfiguration | ( | usbDwcDcdDevice_t * | dwc3 | ) |
This API is called when the set configuration request comes from the host driver.
| dwc3 | pointer to the dwc3 device object |
| void usbDwcDcdSetEpStall | ( | usbDwcDcdDevice_t * | dwc3, |
| uint32_t | phEpId, | ||
| uint32_t | flag | ||
| ) |
This function sets or clear endpoint stall.
| dwc3 | pointer to the dwc3 device object |
| phEpId | Physical endpoint number for which the stall has to be set or cleared. |
| flag | - TRUE - set stall flag - FLASE - clear stall |
| void usbDwcDcdSetupEvntBuf | ( | usbDwcDcdDevice_t * | dwc3, |
| usbDwcDcdEvnt_t * | pUsbEvnt, | ||
| uint32_t | evntSize, | ||
| uint32_t | count, | ||
| uint32_t | eventId | ||
| ) |
Setup Event buffer required by the device control driver.
| dwc3 | pointer to the dwc3 device object |
| pUsbEvnt | pointer to the USB event buffer |
| evntSize | size of the USB event buffer |
| count | count of the USB buffers |
| eventId | ID of the event buffer |
| void usbDwcDcdStartXfer | ( | usbDwcDcdDevice_t * | dwc3, |
| uint32_t | phEpId, | ||
| usbDEpTrb_t * | pDEpTrb | ||
| ) |
Runs a start transfer core command with the provided transfer descriptor.
| dwc3 | pointer to the dwc3 device object |
| phEpId | Physical endpoint ID |
| pDEpTrb | Pointer to the Endpoint TRB |