![]() |
![]() |
This file defines APIs dictated by the SOC specific implementation of the USB system. For example the USB wrapper is implemenation specific and APIs specific to the wrapper is declared here. The defintion of the same would be done in the respective SOC wrapper file. More...
Data Structures | |
| struct | usbWrapParams |
| Structure holding the details of the wrapper implementation. More... | |
| struct | usbWrapIntrObj |
| Structure detailing HW ISR - Reason for HW interrupt and the source. More... | |
| struct | usbWrapper |
| Structure holding the details of the wrapper implementation. More... | |
Macros | |
| #define | USB_WRAP_INTR_SOURCE_MAIN (0x1) |
| USB wrapper main interrupt source . | |
| #define | USB_WRAP_INTR_SOURCE_MISC (0x2) |
| USB wrapper misc interrupt source . | |
Typedefs | |
| typedef struct usbWrapParams | usbWrapParams_t |
| Structure holding the details of the wrapper implementation. | |
| typedef struct usbWrapIntrObj | usbWrapIntrObj_t |
| Structure detailing HW ISR - Reason for HW interrupt and the source. | |
| typedef struct usbWrapper | usbWrapper_t |
| Structure holding the details of the wrapper implementation. | |
| typedef enum usbwrapIntrMisc | usbwrapIntrMisc_t |
| Enumerates the fields of wrapper MISC interrupts. | |
| typedef enum usbwrapIntrMain | usbwrapIntrMain_t |
| Enumerates the fields of wrapper MAIN interrupts. | |
| typedef enum usbwrapIntrMask | usbwrapIntrMask_t |
| Enumerates the possible interrupts that can be generated. | |
Functions | |
| usbWrapper_t * | USBWrapperInit (usbWrapper_t *pWrapperObj, uint32_t instNum) |
| This API returns the address of the required wrapper/controller instance .This is the first API that needs to be called as the address of the instance gets populated by this function.It also populates the params structure with the necessary param values which would be implemented by specific drivers. More... | |
| usbWrapper_t * | USBWrapperGetRevision (usbWrapper_t *pWrapperObj) |
| This API populates the revision number of the USB wrapper implement-. More... | |
| uint32_t | USBWrapperSysConfig (usbWrapper_t *pWrapperObj, uint32_t mode, uint32_t ops) |
| This API configures the wrapper master slave interface parameters. PM mode configuration in master(initiator) and slave (local target) is done using this API. More... | |
| void | USBWrapperIntrClear (usbWrapper_t *pWrapperObj, uint32_t intrMask) |
| This function flags the end of interrupt for all interrupts coming outof the wrapper. Note1: wrapper implementation need to take care to handle all possible interrupts, specifically USB core and miscelleous interrupts. More... | |
| uint32_t | USBWrapperIntrStatus (usbWrapper_t *pWrapperObj, uint32_t intrMask) |
| This function returns the status (whether it has occured or not) for all interrupts coming outof the wrapper. Note1: wrapper implementation need to take care to handle all possible interrupts, specifically USB core and miscelleous interrupts. More... | |
| void | USBWrapperIntrEnable (usbWrapper_t *pWrapperObj, uint32_t intrMask, uint32_t intrSpecific) |
| This API enables interrupts coming out of the USB wrapper. More... | |
| void | USBWrapperIntrDisable (usbWrapper_t *pWrapperObj, uint32_t intrMask, uint32_t intrSpecific) |
| This API disables interrupts coming out of the USB wrapper. More... | |
| uint32_t | USBWrapperIntrEnableStatus (usbWrapper_t *pWrapperObj, uint32_t intrMask, uint32_t intrSpecific) |
| This API returns the enable status of all interrupts coming out of the wrapper. Note1: wrapper implementations have 2 kinds of interrupts - Core interrupts and wrapper interrupts. More... | |
| void | USBWrapperTriggerIntr (usbWrapper_t *pWrapperObj, uint32_t intrMask, uint32_t intrSpecific) |
| This API triggers all interrupts coming out of the wrapper. More... | |
| uint32_t | USBWrapperGetUtmiState (usbWrapper_t *pWrapperObj, uint32_t utmiField) |
| This API returns the current state of the UTMI phy. More... | |
| void | USBWrapperSetUtmiFeature (usbWrapper_t *pWrapperObj, uint32_t utmiField) |
| This API sets a particular UTMI feature. More... | |
| uint32_t | USBWrapperGetUtmiFeature (usbWrapper_t *pWrapperObj, uint32_t utmiField) |
| This API configures the wrapper. More... | |
| void | USBWrapperClearUtmiFeature (usbWrapper_t *pWrapperObj, uint32_t utmiField) |
| This API clears a particular UTMI feature. More... | |
This file defines APIs dictated by the SOC specific implementation of the USB system. For example the USB wrapper is implemenation specific and APIs specific to the wrapper is declared here. The defintion of the same would be done in the respective SOC wrapper file.
| enum usbwrapIntrMain |
Enumerates the fields of wrapper MAIN interrupts.
| enum usbwrapIntrMask |
Enumerates the possible interrupts that can be generated.
| enum usbwrapIntrMisc |
Enumerates the fields of wrapper MISC interrupts.
| void USBWrapperClearUtmiFeature | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | utmiField | ||
| ) |
This API clears a particular UTMI feature.
| pWrapperObj | pointer to the wrapper object |
| utmiField | UTMI feature which needs to be cleared. This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -#usbwrapUtmiCfg_t. |
| usbWrapper_t* USBWrapperGetRevision | ( | usbWrapper_t * | pWrapperObj | ) |
This API populates the revision number of the USB wrapper implement-.
Note1: wrapper implementations can implement hard checks for a revison match.
| pWrapperObj | pointer to the wrapper object |
| pWrapperObj | pointer to the wrapper object |
| uint32_t USBWrapperGetUtmiFeature | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | utmiField | ||
| ) |
This API configures the wrapper.
Note1: wrapper implementations can implement hard checks for a revison match.
| pWrapperObj | pointer to the wrapper object |
| utmiField | UTMI feature which needs to be enabled. This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -#usbwrapUtmiCfg_t. |
| regVal | 1or 0 standing for set or cleared. |
| uint32_t USBWrapperGetUtmiState | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | utmiField | ||
| ) |
This API returns the current state of the UTMI phy.
| pWrapperObj | pointer to the wrapper object |
| utmiField | UTMI field whose status needs to be queried. This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -#usbwrapUtmiCtrl_t. |
| Value | 1or 0 standing for set or cleared. |
| usbWrapper_t* USBWrapperInit | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | instNum | ||
| ) |
This API returns the address of the required wrapper/controller instance .This is the first API that needs to be called as the address of the instance gets populated by this function.It also populates the params structure with the necessary param values which would be implemented by specific drivers.
| pWrapperObj | pointer to the wrapper object |
| instNum | instance number of the controller/wrapper instance whose address is to be returned. |
| pWrapperObj | pointer to the wrapper object |
| void USBWrapperIntrClear | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | intrMask | ||
| ) |
This function flags the end of interrupt for all interrupts coming outof the wrapper. Note1: wrapper implementation need to take care to handle all possible interrupts, specifically USB core and miscelleous interrupts.
| pWrapperObj | pointer to the wrapper object |
| intrMask | Interrupt that needs to be marked clear (EOI). This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -usbwrapIntrMask_t. |
| void USBWrapperIntrDisable | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | intrMask, | ||
| uint32_t | intrSpecific | ||
| ) |
This API disables interrupts coming out of the USB wrapper.
Note1: wrapper implementations have 2 kinds of interrupts - Core interrupts and wrapper interrupts.
| pWrapperObj | pointer to the wrapper object |
| intrMask | Interrupt that needs to be marked clear (EOI). This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -usbwrapIntrMask_t. |
| intrSpecific | details of the interrupt which need to be modified |
| void USBWrapperIntrEnable | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | intrMask, | ||
| uint32_t | intrSpecific | ||
| ) |
This API enables interrupts coming out of the USB wrapper.
Note1: wrapper implementations have 2 kinds of interrupts - Core interrupts and wrapper interrupts.
| pWrapperObj | pointer to the wrapper object |
| intrMask | Interrupt that needs to be enabled. This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -usbwrapIntrMask_t. |
| intrSpecific | details of the interrupt which need to be modified |
| uint32_t USBWrapperIntrEnableStatus | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | intrMask, | ||
| uint32_t | intrSpecific | ||
| ) |
This API returns the enable status of all interrupts coming out of the wrapper. Note1: wrapper implementations have 2 kinds of interrupts - Core interrupts and wrapper interrupts.
| pWrapperObj | pointer to the wrapper object |
| intrMask | Interrupt that needs to be checked for enable/disable status. This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -usbwrapIntrMask_t. |
| intrSpecific | details of the interrupt which need to be probed |
| Value | 1or 0 standing for set or cleared. |
| uint32_t USBWrapperIntrStatus | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | intrMask | ||
| ) |
This function returns the status (whether it has occured or not) for all interrupts coming outof the wrapper. Note1: wrapper implementation need to take care to handle all possible interrupts, specifically USB core and miscelleous interrupts.
| pWrapperObj | pointer to the wrapper object |
| intrMask | Interrupt whose status needs to be returned. This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -usbwrapIntrMask_t. |
| Value | 1or 0 standing for set or cleared. |
| void USBWrapperSetUtmiFeature | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | utmiField | ||
| ) |
This API sets a particular UTMI feature.
| pWrapperObj | pointer to the wrapper object |
| utmiField | UTMI feature which needs to be enabled. This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -#usbwrapUtmiCfg_t. |
| uint32_t USBWrapperSysConfig | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | mode, | ||
| uint32_t | ops | ||
| ) |
This API configures the wrapper master slave interface parameters. PM mode configuration in master(initiator) and slave (local target) is done using this API.
| pWrapperObj | pointer to the wrapper object |
| mode | Value determining the System configuration field which would be read or written to. Values taken would be implementation specifc. As an example in the case of AM43xx -#usbwrapSyscfg_t. |
| ops | Operations possible on the register fields Possible values are :
|
| regVal | Value depends on the operation performed. As in if ops is USB_SET_VALUE - regVal has no significance USB_GET_VALUE - returns the value of the field asked for USB_CLEAR_VALUE - regVal has no significance |
| void USBWrapperTriggerIntr | ( | usbWrapper_t * | pWrapperObj, |
| uint32_t | intrMask, | ||
| uint32_t | intrSpecific | ||
| ) |
This API triggers all interrupts coming out of the wrapper.
Note1: wrapper implementations have 2 kinds of interrupts - Core interrupts and wrapper interrupts.
| pWrapperObj | pointer to the wrapper object |
| intrMask | Interrupt that needs to be triggered. This is platform dependent would be implemented by the wrapper driver. As an example in the case of AM43xx it is -usbwrapIntrMask_t. |
| intrSpecific | details of the interrupt which need to be probed |