usbpsu
Vitis Drivers API Documentation
xusb_class_dfu.h File Reference

Overview

This file contains definitions used in the DFU class code.

MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 vak 30/11/16 Added DFU support 1.4 BK 12/01/18 Renamed the file to be in sync with usb common code changes for all USB IPs

 

Functions

s32 Usb_DfuSetState (struct dfu_if *DFU, u8 dfu_state)
 This function handles setting of DFU state. More...
 
void USB_DfuSetDwloadState (struct dfu_if *DFU, u8 *status)
 This function updates the current state while downloading a file. More...
 
s32 USB_DfuGetStatus (struct dfu_if *DFU, u8 *status)
 This function handles getting of DFU status. More...
 
void Usb_DfuDisconnect (struct Usb_DevData *InstancePtr)
 This function handles DFU disconnect, called from driver. More...
 
void Usb_DfuReset (struct Usb_DevData *InstancePtr)
 This function handles DFU reset, called from driver. More...
 
void Usb_DfuSetIntf (struct Usb_DevData *InstancePtr, SetupPacket *SetupData)
 This function handles DFU set interface. More...
 
void Usb_DfuClassReq (struct Usb_DevData *InstancePtr, SetupPacket *SetupData)
 This function handles DFU heart and soul of DFU state machine. More...
 

Function Documentation

void Usb_DfuClassReq ( struct Usb_DevData InstancePtr,
SetupPacket *  SetupData 
)

This function handles DFU heart and soul of DFU state machine.

Parameters
InstancePtris a pointer to Usb_DevData instance of the controller
SetupDatais a pointer to setup token of control transfer
Returns
None.
Note
None.

References Usb_DevData::PrivateData, Usb_DfuClassReq(), USB_DfuGetStatus(), and Usb_DfuSetState().

Referenced by Usb_ClassReq(), and Usb_DfuClassReq().

void Usb_DfuDisconnect ( struct Usb_DevData InstancePtr)

This function handles DFU disconnect, called from driver.

Parameters
InstancePtris a pointer to Usb_DevData instance of the controller
Returns
None.
Note
None.

References Usb_DevData::PrivateData.

s32 USB_DfuGetStatus ( struct dfu_if *  DFU,
u8 *  status 
)

This function handles getting of DFU status.

Parameters
DFUis a pointer to DFU instance of the controller
statusis the pointer of the DFU status
Returns
None
Note
None.
Parameters
DFUis a pointer to DFU instance of the controller
statusis the pointer of the DFU status
Returns
  • XST_SUCCESS if the function is successful.
Note
None.
void Usb_DfuReset ( struct Usb_DevData InstancePtr)

This function handles DFU reset, called from driver.

Parameters
InstancePtris a pointer to Usb_DevData instance of the controller
Returns
None.
Note
None.

References Usb_DevData::PrivateData.

void USB_DfuSetDwloadState ( struct dfu_if *  DFU,
u8 *  status 
)

This function updates the current state while downloading a file.

Parameters
DFUis a pointer to DFU instance of the controller
statusis a pointer of the DFU status
Note
None.
void Usb_DfuSetIntf ( struct Usb_DevData InstancePtr,
SetupPacket *  SetupData 
)

This function handles DFU set interface.

Parameters
InstancePtris a pointer to Usb_DevData instance of the controller
SetupDatais a pointer to setup token of control transfer
Returns
None.
Note
None.

References Usb_DevData::PrivateData, and Usb_DfuSetState().

s32 Usb_DfuSetState ( struct dfu_if *  DFU,
u8  dfu_state 
)

This function handles setting of DFU state.

Parameters
DFUis a pointer to DFU instance of the controller
dfu_stateis a value of the DFU state to be set
Returns
- XST_SUCCESS if the function is successful.
  • XST_FAILURE if an Error occurred.
Note
None.