MODIFICATION HISTORY:
Ver Who Date Changes ----- ---- ----------------------------------------------------------------- 1.00a hvm 2/22/07 First release 2.00a hvm 10/22/08 Added DMA APIs. 3.00a hvm 12/3/09 Added XUsb_ReadErrorCounters API to return USB error counters data. Updated to use HAL processor APIs. XUsb_mReadReg is renamed to XUsb_ReadReg and XUsb_mWriteReg is renamed to XUsb_WriteReg. 3.02a hvm 7/15/10 Added Device ID initialization in XUsb_CfgInitialize function (CR555996). 4.00a hvm 10/21/10 Added ULPI PHY Read/Write APIs. Added DMA handler initialization in XUsb_CfgInitialize function 4.03a bss 06/20/10 Added SIE Reset API (XUsb_SieReset) to reset the SIE state machine (CR 660602)
#include "xusb.h"
Functions | |
int | XUsb_CfgInitialize (XUsb *InstancePtr, XUsb_Config *ConfigPtr, u32 EffectiveAddr) |
int | XUsb_ConfigureDevice (XUsb *InstancePtr, XUsb_DeviceConfig *CfgPtr) |
void | XUsb_Start (XUsb *InstancePtr) |
void | XUsb_Stop (XUsb *InstancePtr) |
u32 | XUsb_GetFrameNum (const XUsb *InstancePtr) |
int | XUsb_SetDeviceAddress (XUsb *InstancePtr, u8 Address) |
void | XUsb_SetTestMode (XUsb *InstancePtr, u8 TestMode, u8 *BufPtr) |
void | XUsb_DmaReset (XUsb *InstancePtr) |
void | XUsb_DmaTransfer (XUsb *InstancePtr, u32 *SrcAddr, u32 *DstAddr, u16 Length) |
void | XUsb_ReadErrorCounters (XUsb *InstancePtr, u8 *BitStuffErrors, u8 *PidErrors, u8 *CrcErrors) |
u8 | XUsb_UlpiPhyReadRegister (XUsb *InstancePtr, u8 RegAddr) |
int | XUsb_UlpiPhyWriteRegister (XUsb *InstancePtr, u8 RegAddr, u8 UlpiPhyRegData) |
void | XUsb_SieReset (XUsb *InstancePtr) |
|
This function initializes a XUsb instance/driver. The initialization entails:
|
|
This function initializes USB End points.
|
|
This function resets the DMA module of the USB device
|
|
This function sets the DMA registers with the given values to initiate a DMA data transfer. This function is called by the XUsb_EpDataSend and XUsb_EpDataRecv functions.
|
|
This function returns the current frame number.
|
|
This function reads the USB error counter regsiter and returns the error counters information.
|
|
This function sets the USB device address.
|
|
This function sets the USB device into a given test mode.
|
|
This function resets the Serial Interface Engine
|
|
This function starts the USB Device.
|
|
This function stops the USB device.
|
|
This function initiates the USB ULPI PHY regsiter read transaction. This function returns the busy status if the earlier transaction is still in progress and returns the PHY register data upon successful read transaction.
|
|
This function initiates the USB ULPI PHY regsiter write transaction. This function returns the busy status if the earlier transaction is still in progress and returns a success upon successful write transaction initiation.
|