PSPSDK 2024-12-16
Loading...
Searching...
No Matches
pspusbbus.h File Reference

Go to the source code of this file.

Data Structures

struct  UsbInterface
 USB driver interface. More...
 
struct  UsbEndpoint
 USB driver endpoint. More...
 
struct  StringDescriptor
 USB string descriptor. More...
 
struct  DeviceDescriptor
 USB device descriptor. More...
 
struct  ConfigDescriptor
 USB configuration descriptor. More...
 
struct  InterfaceDescriptor
 USB Interface descriptor. More...
 
struct  EndpointDescriptor
 USB endpoint descriptor. More...
 
struct  UsbInterfaces
 USB driver interfaces structure. More...
 
struct  UsbConfiguration
 USB driver configuration. More...
 
struct  UsbData
 Padded data structure, padding is required otherwise the USB hardware crashes. More...
 
struct  UsbData::Config
 
struct  UsbData::ConfDesc
 
struct  UsbData::Interfaces
 
struct  UsbData::InterDesc
 
struct  UsbData::Endp
 
struct  Config
 
struct  ConfDesc
 
struct  Interfaces
 
struct  InterDesc
 
struct  Endp
 
struct  DeviceRequest
 USB EP0 Device Request. More...
 
struct  UsbDriver
 USB driver structure used by sceUsbbdRegister and sceUsbbdUnregister. More...
 
struct  UsbdDeviceReq
 USB device request, used by sceUsbbdReqSend and sceUsbbdReqRecv. More...
 

Functions

struct StringDescriptor __attribute__ ((packed))
 
int sceUsbbdRegister (struct UsbDriver *drv)
 Register a USB driver.
 
int sceUsbbdUnregister (struct UsbDriver *drv)
 Unregister a USB driver.
 
int sceUsbbdClearFIFO (struct UsbEndpoint *endp)
 Clear the FIFO on an endpoint.
 
int sceUsbbdReqCancelAll (struct UsbEndpoint *endp)
 Cancel any pending requests on an endpoint.
 
int sceUsbbdStall (struct UsbEndpoint *endp)
 Stall an endpoint.
 
int sceUsbbdReqSend (struct UsbdDeviceReq *req)
 Queue a send request (IN from host pov)
 
int sceUsbbdReqRecv (struct UsbdDeviceReq *req)
 Queue a receive request (OUT from host pov)
 

Variables

unsigned char bLength
 
unsigned char bDescriptorType
 
short bString [32]
 
unsigned short bcdUSB
 
unsigned char bDeviceClass
 
unsigned char bDeviceSubClass
 
unsigned char bDeviceProtocol
 
unsigned char bMaxPacketSize
 
unsigned short idVendor
 
unsigned short idProduct
 
unsigned short bcdDevice
 
unsigned char iManufacturer
 
unsigned char iProduct
 
unsigned char iSerialNumber
 
unsigned char bNumConfigurations
 
unsigned short wTotalLength
 
unsigned char bNumInterfaces
 
unsigned char bConfigurationValue
 
unsigned char iConfiguration
 
unsigned char bmAttributes
 
unsigned char bMaxPower
 
unsigned char bInterfaceNumber
 
unsigned char bAlternateSetting
 
unsigned char bNumEndpoints
 
unsigned char bInterfaceClass
 
unsigned char bInterfaceSubClass
 
unsigned char bInterfaceProtocol
 
unsigned char iInterface
 
unsigned char bEndpointAddress
 
unsigned short wMaxPacketSize
 
unsigned char bInterval
 
struct UsbInterfaces __attribute__
 
unsigned char devdesc [20]
 
struct Config config
 
struct ConfDesc confdesc
 
unsigned char pad1 [8]
 
struct Interfaces interfaces
 
struct InterDesc interdesc
 
struct Endp endp [4]
 
unsigned char bmRequestType
 
unsigned char bRequest
 
unsigned short wValue
 
unsigned short wIndex
 
unsigned short wLength
 

Function Documentation

◆ __attribute__()

struct StringDescriptor __attribute__ ( (packed )

◆ sceUsbbdClearFIFO()

int sceUsbbdClearFIFO ( struct UsbEndpoint endp)

Clear the FIFO on an endpoint.

Parameters
endp- The endpoint to clear
Returns
0 on success, < 0 on error

◆ sceUsbbdRegister()

int sceUsbbdRegister ( struct UsbDriver drv)

Register a USB driver.

Parameters
drv- Pointer to a filled out USB driver
Returns
0 on success, < 0 on error

◆ sceUsbbdReqCancelAll()

int sceUsbbdReqCancelAll ( struct UsbEndpoint endp)

Cancel any pending requests on an endpoint.

Parameters
endp- The endpoint to cancel
Returns
0 on success, < 0 on error

◆ sceUsbbdReqRecv()

int sceUsbbdReqRecv ( struct UsbdDeviceReq req)

Queue a receive request (OUT from host pov)

Parameters
req- Pointer to a filled out UsbdDeviceReq structure
Returns
0 on success, < 0 on error

◆ sceUsbbdReqSend()

int sceUsbbdReqSend ( struct UsbdDeviceReq req)

Queue a send request (IN from host pov)

Parameters
req- Pointer to a filled out UsbdDeviceReq structure.
Returns
0 on success, < 0 on error

◆ sceUsbbdStall()

int sceUsbbdStall ( struct UsbEndpoint endp)

Stall an endpoint.

Parameters
endp- The endpoint to stall
Returns
0 on success, < 0 on error

◆ sceUsbbdUnregister()

int sceUsbbdUnregister ( struct UsbDriver drv)

Unregister a USB driver.

Parameters
drv- Pointer to a filled out USB driver
Returns
0 on success, < 0 on error

Variable Documentation

◆ __attribute__

struct UsbDriver __attribute__

◆ bAlternateSetting

unsigned char bAlternateSetting

◆ bcdDevice

unsigned short bcdDevice

◆ bcdUSB

unsigned short bcdUSB

◆ bConfigurationValue

unsigned char bConfigurationValue

◆ bDescriptorType

unsigned char bDescriptorType

◆ bDeviceClass

unsigned char bDeviceClass

◆ bDeviceProtocol

unsigned char bDeviceProtocol

◆ bDeviceSubClass

unsigned char bDeviceSubClass

◆ bEndpointAddress

unsigned char bEndpointAddress

◆ bInterfaceClass

unsigned char bInterfaceClass

◆ bInterfaceNumber

unsigned char bInterfaceNumber

◆ bInterfaceProtocol

unsigned char bInterfaceProtocol

◆ bInterfaceSubClass

unsigned char bInterfaceSubClass

◆ bInterval

unsigned char bInterval

◆ bLength

unsigned char bLength

◆ bmAttributes

unsigned char bmAttributes

◆ bMaxPacketSize

unsigned char bMaxPacketSize

◆ bMaxPower

unsigned char bMaxPower

◆ bmRequestType

unsigned char bmRequestType

◆ bNumConfigurations

unsigned char bNumConfigurations

◆ bNumEndpoints

unsigned char bNumEndpoints

◆ bNumInterfaces

unsigned char bNumInterfaces

◆ bRequest

unsigned char bRequest

◆ bString

short bString[32]

◆ confdesc

struct ConfDesc confdesc

◆ config

struct Config config

◆ devdesc

unsigned char devdesc[20]

◆ endp

struct Endp endp[4]

◆ iConfiguration

unsigned char iConfiguration

◆ idProduct

unsigned short idProduct

◆ idVendor

unsigned short idVendor

◆ iInterface

unsigned char iInterface

◆ iManufacturer

unsigned char iManufacturer

◆ interdesc

struct InterDesc interdesc

◆ interfaces

struct Interfaces interfaces

◆ iProduct

unsigned char iProduct

◆ iSerialNumber

unsigned char iSerialNumber

◆ pad1

unsigned char pad1[8]

◆ wIndex

unsigned short wIndex

◆ wLength

unsigned short wLength

◆ wMaxPacketSize

unsigned short wMaxPacketSize

◆ wTotalLength

unsigned short wTotalLength

◆ wValue

unsigned short wValue