usbpsu
Xilinx SDK Drivers API Documentation
xusbpsu_ch9_storage.h File Reference

Overview

This file contains definitions used in the chapter 9 code.

MODIFICATION HISTORY:
Ver   Who  Date     Changes

1.0 sg 06/06/16 First release
 

Functions

u32 XUsbPsu_Ch9SetupDevDescReply (struct XUsbPsu *InstancePtr, u8 *BufPtr, u32 BufLen)
 This function returns the device descriptor for the device. More...
 
u32 XUsbPsu_Ch9SetupCfgDescReply (struct XUsbPsu *InstancePtr, u8 *BufPtr, u32 BufLen)
 This function returns the configuration descriptor for the device. More...
 
u32 XUsbPsu_Ch9SetupBosDescReply (u8 *BufPtr, u32 BufLen)
 This function returns the BOS descriptor for the device. More...
 
u32 XUsbPsu_Ch9SetupStrDescReply (struct XUsbPsu *InstancePtr, u8 *BufPtr, u32 BufLen, u8 Index)
 This function returns a string descriptor for the given index. More...
 
s32 XUsbPsu_SetConfiguration (struct XUsbPsu *InstancePtr, SetupPacket *Ctrl)
 Changes State of Core to USB configured State. More...
 
s32 XUsbPsu_SetConfigurationApp (struct XUsbPsu *InstancePtr, SetupPacket *Ctrl)
 This function is called by Chapter9 handler when SET_CONFIGURATION command is received from Host. More...
 

Function Documentation

◆ XUsbPsu_Ch9SetupBosDescReply()

u32 XUsbPsu_Ch9SetupBosDescReply ( u8 *  BufPtr,
u32  BufLen 
)

This function returns the BOS descriptor for the device.

Parameters
BufPtris the pointer to the buffer that is to be filled with the descriptor.
BufLenis the size of the provided buffer.
Returns
Length of the descriptor in the buffer on success. 0 on error.

Referenced by dfu_init_data().

◆ XUsbPsu_Ch9SetupCfgDescReply()

u32 XUsbPsu_Ch9SetupCfgDescReply ( struct XUsbPsu InstancePtr,
u8 *  BufPtr,
u32  BufLen 
)

This function returns the configuration descriptor for the device.

Parameters
BufPtris the pointer to the buffer that is to be filled with the descriptor.
BufLenis the size of the provided buffer.
Returns
Length of the descriptor in the buffer on success. 0 on error.

Referenced by dfu_init_data().

◆ XUsbPsu_Ch9SetupDevDescReply()

u32 XUsbPsu_Ch9SetupDevDescReply ( struct XUsbPsu InstancePtr,
u8 *  BufPtr,
u32  BufLen 
)

This function returns the device descriptor for the device.

Parameters
BufPtris pointer to the buffer that is to be filled with the descriptor.
BufLenis the size of the provided buffer.
Returns
Length of the descriptor in the buffer on success. 0 on error.

Referenced by dfu_init_data().

◆ XUsbPsu_Ch9SetupStrDescReply()

u32 XUsbPsu_Ch9SetupStrDescReply ( struct XUsbPsu InstancePtr,
u8 *  BufPtr,
u32  BufLen,
u8  Index 
)

This function returns a string descriptor for the given index.

Parameters
BufPtris a pointer to the buffer that is to be filled with the descriptor.
BufLenis the size of the provided buffer.
Indexis the index of the string for which the descriptor is requested.
Returns
Length of the descriptor in the buffer on success. 0 on error.

Referenced by dfu_init_data().

◆ XUsbPsu_SetConfiguration()

s32 XUsbPsu_SetConfiguration ( struct XUsbPsu InstancePtr,
SetupPacket *  Ctrl 
)

Changes State of Core to USB configured State.

Parameters
InstancePtris a pointer to the XUsbPsu instance.
Ctrlis a pointer to the Setup packet data.
Returns
XST_SUCCESS else XST_FAILURE
Note
None.

Referenced by dfu_init_data().

◆ XUsbPsu_SetConfigurationApp()

s32 XUsbPsu_SetConfigurationApp ( struct XUsbPsu InstancePtr,
SetupPacket *  SetupData 
)

This function is called by Chapter9 handler when SET_CONFIGURATION command is received from Host.

Parameters
InstancePtris pointer to XUsbPsu instance.
SetupDatais the setup packet received from Host.
Returns
  • XST_SUCCESS if successful,
  • XST_FAILURE if unsuccessful.
Note
Non control endpoints must be enabled after SET_CONFIGURATION command since hardware clears all previously enabled endpoints except control endpoints when this command is received.

Referenced by dfu_init_data().