pspsdk-1.0+beta2
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 ::sceUsbbdRegisterDriver and ::sceUsbbdUnregisterDriver. 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

struct StringDescriptor __attribute__ ( (packed)  )
int sceUsbbdClearFIFO ( struct UsbEndpoint endp)

Clear the FIFO on an endpoint.

Parameters
endp- The endpoint to clear
Returns
0 on success, < 0 on error
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
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
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
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
int sceUsbbdStall ( struct UsbEndpoint endp)

Stall an endpoint.

Parameters
endp- The endpoint to stall
Returns
0 on success, < 0 on error
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

unsigned char bAlternateSetting
unsigned short bcdDevice
unsigned short bcdUSB
unsigned char bConfigurationValue
unsigned char bDescriptorType
unsigned char bDeviceClass
unsigned char bDeviceProtocol
unsigned char bDeviceSubClass
unsigned char bEndpointAddress
unsigned char bInterfaceClass
unsigned char bInterfaceNumber
unsigned char bInterfaceProtocol
unsigned char bInterfaceSubClass
unsigned char bInterval
unsigned char bLength
unsigned char bmAttributes
unsigned char bMaxPacketSize
unsigned char bMaxPower
unsigned char bmRequestType
unsigned char bNumConfigurations
unsigned char bNumEndpoints
unsigned char bNumInterfaces
unsigned char bRequest
short bString[32]
struct ConfDesc confdesc
struct Config config
unsigned char devdesc[20]
struct Endp endp[4]

Referenced by load_mapfile(), and validate_number().

unsigned char iConfiguration
unsigned short idProduct
unsigned short idVendor
unsigned char iInterface
unsigned char iManufacturer
struct InterDesc interdesc
struct Interfaces interfaces
unsigned char iProduct
unsigned char iSerialNumber
unsigned char pad1[8]
unsigned short wIndex
unsigned short wLength
unsigned short wMaxPacketSize
unsigned short wTotalLength
unsigned short wValue