usbpsu
Vitis Drivers API Documentation
xusb_freertos_ch9_composite.h File Reference

Overview

This file contains definitions used in composite device specific chapter 9 code.

MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.0 rb 28/03/18 First release

 

Data Structures

struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 
struct  __attribute__
 struct SetupPacket - USB Standard Control Request More...
 

Functions

u32 Usb_Ch9SetupBosDescReply (u8 *BufPtr, u32 BufLen)
 This function returns the BOS descriptor for the device. More...
 
u32 Usb_Ch9SetupDevDescReply (struct Usb_DevData *InstancePtr, u8 *BufPtr, u32 BufLen)
 This function returns the device descriptor for the device. More...
 
u32 Usb_Ch9SetupCfgDescReply (struct Usb_DevData *InstancePtr, u8 *BufPtr, u32 BufLen)
 This function returns the configuration descriptor for the device. More...
 
u32 Usb_Ch9SetupStrDescReply (struct Usb_DevData *InstancePtr, u8 *BufPtr, u32 BufLen, u8 Index)
 This function returns a string descriptor for the given index. More...
 
s32 Usb_SetConfiguration (struct Usb_DevData *InstancePtr, SetupPacket *Ctrl)
 Changes State of Core to USB configured State. More...
 
s32 Usb_SetConfigurationApp (struct Usb_DevData *InstancePtr, SetupPacket *Ctrl)
 This function is called by Chapter9 handler when SET_CONFIGURATION command is received from Host. More...
 
u32 Usb_GetDescReply (struct Usb_DevData *InstancePtr, SetupPacket *SetupData, u8 *BufPtr)
 This function returns a keyboard descriptors. More...
 

Function Documentation

u32 Usb_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.
u32 Usb_Ch9SetupCfgDescReply ( struct Usb_DevData InstancePtr,
u8 *  BufPtr,
u32  BufLen 
)

This function returns the configuration descriptor for the device.

Parameters
InstancePtris a pointer to the Usb_DevData instance.
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.
u32 Usb_Ch9SetupDevDescReply ( struct Usb_DevData InstancePtr,
u8 *  BufPtr,
u32  BufLen 
)

This function returns the device descriptor for the device.

Parameters
InstancePtris a pointer to the Usb_DevData instance.
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.
u32 Usb_Ch9SetupStrDescReply ( struct Usb_DevData InstancePtr,
u8 *  BufPtr,
u32  BufLen,
u8  Index 
)

This function returns a string descriptor for the given index.

Parameters
InstancePtris a pointer to the Usb_DevData instance.
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.
u32 Usb_GetDescReply ( struct Usb_DevData InstancePtr,
SetupPacket *  SetupData,
u8 *  BufPtr 
)

This function returns a keyboard descriptors.

Parameters
InstancePtris a pointer to the Usb_DevData instance.
Ctrlis a pointer to the Setup packet data.
BufPtris a pointer to the buffer that is to be filled with the descriptor.
Returns
Length of the descriptor in the buffer on success. 0 on error.
s32 Usb_SetConfiguration ( struct Usb_DevData InstancePtr,
SetupPacket *  Ctrl 
)

Changes State of Core to USB configured State.

Parameters
InstancePtris a pointer to the Usb_DevData instance.
Ctrlis a pointer to the Setup packet data.
Returns
XST_SUCCESS else XST_FAILURE
Note
None.
Parameters
InstancePtris a pointer to the Usb_DevData instance.
Ctrlis a pointer to the Setup packet data.
Returns
XST_SUCCESS or XST_FAILURE if device is not in address state
Note
None.
s32 Usb_SetConfigurationApp ( struct Usb_DevData InstancePtr,
SetupPacket *  SetupData 
)

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

Parameters
InstancePtris pointer to Usb_DevData instance.
SetupDatais the setup packet received from Host.
Returns
- XST_SUCCESS if successful,
  • XST_FAILURE if unsuccessful.
Parameters
InstancePtris pointer to Usb_DevData 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.