11#ifndef __PSPUSBBUS_H__
12#define __PSPUSBBUS_H__
unsigned char size
Definition pspsysmem_kernel.h:6
float x
Definition psptypes.h:0
int sceUsbbdClearFIFO(struct UsbEndpoint *endp)
Clear the FIFO on an endpoint.
int sceUsbbdReqRecv(struct UsbdDeviceReq *req)
Queue a receive request (OUT from host pov)
struct UsbInterfaces __attribute__
int sceUsbbdReqSend(struct UsbdDeviceReq *req)
Queue a send request (IN from host pov)
int sceUsbbdStall(struct UsbEndpoint *endp)
Stall an endpoint.
int sceUsbbdReqCancelAll(struct UsbEndpoint *endp)
Cancel any pending requests on an endpoint.
int sceUsbbdUnregister(struct UsbDriver *drv)
Unregister a USB driver.
int sceUsbbdRegister(struct UsbDriver *drv)
Register a USB driver.
USB configuration descriptor.
Definition pspusbbus.h:69
unsigned char bConfigurationValue
Definition pspusbbus.h:74
unsigned char bLength
Definition pspusbbus.h:70
unsigned char bDescriptorType
Definition pspusbbus.h:71
unsigned short wTotalLength
Definition pspusbbus.h:72
unsigned char bmAttributes
Definition pspusbbus.h:76
unsigned char bNumInterfaces
Definition pspusbbus.h:73
unsigned char iConfiguration
Definition pspusbbus.h:75
unsigned char bMaxPower
Definition pspusbbus.h:77
USB device descriptor.
Definition pspusbbus.h:50
unsigned short idProduct
Definition pspusbbus.h:59
unsigned char bDeviceClass
Definition pspusbbus.h:54
unsigned short bcdUSB
Definition pspusbbus.h:53
unsigned short bcdDevice
Definition pspusbbus.h:60
unsigned char iSerialNumber
Definition pspusbbus.h:63
unsigned char bDeviceSubClass
Definition pspusbbus.h:55
unsigned char bMaxPacketSize
Definition pspusbbus.h:57
unsigned char bDescriptorType
Definition pspusbbus.h:52
unsigned char bDeviceProtocol
Definition pspusbbus.h:56
unsigned char iManufacturer
Definition pspusbbus.h:61
unsigned char iProduct
Definition pspusbbus.h:62
unsigned short idVendor
Definition pspusbbus.h:58
unsigned char bNumConfigurations
Definition pspusbbus.h:64
unsigned char bLength
Definition pspusbbus.h:51
USB EP0 Device Request.
Definition pspusbbus.h:168
unsigned short wIndex
Definition pspusbbus.h:172
unsigned char bmRequestType
Definition pspusbbus.h:169
unsigned short wLength
Definition pspusbbus.h:173
unsigned short wValue
Definition pspusbbus.h:171
unsigned char bRequest
Definition pspusbbus.h:170
USB endpoint descriptor.
Definition pspusbbus.h:96
unsigned char bLength
Definition pspusbbus.h:97
unsigned char bInterval
Definition pspusbbus.h:102
unsigned short wMaxPacketSize
Definition pspusbbus.h:101
unsigned char bmAttributes
Definition pspusbbus.h:100
unsigned char bDescriptorType
Definition pspusbbus.h:98
unsigned char bEndpointAddress
Definition pspusbbus.h:99
USB Interface descriptor.
Definition pspusbbus.h:82
unsigned char bLength
Definition pspusbbus.h:83
unsigned char bInterfaceProtocol
Definition pspusbbus.h:90
unsigned char bInterfaceNumber
Definition pspusbbus.h:85
unsigned char bInterfaceClass
Definition pspusbbus.h:88
unsigned char bDescriptorType
Definition pspusbbus.h:84
unsigned char bInterfaceSubClass
Definition pspusbbus.h:89
unsigned char iInterface
Definition pspusbbus.h:91
unsigned char bAlternateSetting
Definition pspusbbus.h:86
unsigned char bNumEndpoints
Definition pspusbbus.h:87
USB string descriptor.
Definition pspusbbus.h:42
short bString[32]
Definition pspusbbus.h:45
unsigned char bDescriptorType
Definition pspusbbus.h:44
unsigned char bLength
Definition pspusbbus.h:43
USB driver configuration.
Definition pspusbbus.h:116
struct UsbInterfaces * infs
USB driver interfaces pointer.
Definition pspusbbus.h:120
struct EndpointDescriptor * endp
Pointer to the first endpoint descriptor (each should be 16byte aligned)
Definition pspusbbus.h:124
struct InterfaceDescriptor * infp
Pointer to the first interface descriptor.
Definition pspusbbus.h:122
struct ConfigDescriptor * confp
Pointer to the configuration descriptors.
Definition pspusbbus.h:118
Definition pspusbbus.h:141
unsigned char desc[12]
Definition pspusbbus.h:142
void * pinterfaces
Definition pspusbbus.h:143
Definition pspusbbus.h:133
void * pinterfaces
Definition pspusbbus.h:135
void * pendp
Definition pspusbbus.h:137
void * pconfdesc
Definition pspusbbus.h:134
void * pinterdesc
Definition pspusbbus.h:136
Definition pspusbbus.h:161
unsigned char desc[16]
Definition pspusbbus.h:162
Definition pspusbbus.h:154
unsigned char desc[12]
Definition pspusbbus.h:155
unsigned char pad[32]
Definition pspusbbus.h:157
void * pendp
Definition pspusbbus.h:156
Definition pspusbbus.h:148
void * pinterdesc[2]
Definition pspusbbus.h:149
unsigned int intcount
Definition pspusbbus.h:150
Padded data structure, padding is required otherwise the USB hardware crashes.
Definition pspusbbus.h:129
struct UsbData::Endp endp[4]
struct UsbData::InterDesc interdesc
struct UsbData::Config config
struct UsbData::Interfaces interfaces
unsigned char devdesc[20]
Definition pspusbbus.h:130
unsigned char pad1[8]
Definition pspusbbus.h:146
struct UsbData::ConfDesc confdesc
USB driver structure used by sceUsbbdRegister and sceUsbbdUnregister.
Definition pspusbbus.h:178
struct UsbDriver * link
Link to next USB driver in the chain, set to NULL.
Definition pspusbbus.h:212
void * confp
Pointer to full-speed device configuration.
Definition pspusbbus.h:194
void * devp
Pointer to full-speed device descriptor.
Definition pspusbbus.h:192
int(* stop_func)(int size, void *args)
Function called when the driver is stopped.
Definition pspusbbus.h:210
int(* start_func)(int size, void *args)
Function called when the driver is started.
Definition pspusbbus.h:208
void * devp_hi
Pointer to hi-speed device descriptor.
Definition pspusbbus.h:188
void * confp_hi
Pointer to hi-speed device configuration.
Definition pspusbbus.h:190
struct StringDescriptor * str
Default String descriptor.
Definition pspusbbus.h:196
struct UsbEndpoint * endp
List of endpoint structures (used when calling other functions)
Definition pspusbbus.h:184
const char * name
Name of the USB driver.
Definition pspusbbus.h:180
int(* attach)(int speed, void *arg2, void *arg3)
Configuration set (attach) function.
Definition pspusbbus.h:202
int(* detach)(int arg1, int arg2, int arg3)
Configuration unset (detach) function.
Definition pspusbbus.h:204
int unk34
Unknown set to 0.
Definition pspusbbus.h:206
struct UsbInterface * intp
Interface list.
Definition pspusbbus.h:186
int(* recvctl)(int arg1, int arg2, struct DeviceRequest *req)
Received a control request arg0 is endpoint, arg1 is possibly data arg2 is data buffer.
Definition pspusbbus.h:198
int(* func28)(int arg1, int arg2, int arg3)
Unknown.
Definition pspusbbus.h:200
int endpoints
Number of endpoints in this driver (including default control)
Definition pspusbbus.h:182
USB driver endpoint.
Definition pspusbbus.h:31
int unk2
Filled in by the bus driver.
Definition pspusbbus.h:35
int unk3
Filled in by the bus driver.
Definition pspusbbus.h:37
int endpnum
Endpoint number (must be filled in sequentially)
Definition pspusbbus.h:33
USB driver interface.
Definition pspusbbus.h:20
int expect_interface
Expectant interface (0 or -1)
Definition pspusbbus.h:22
int unk8
Unknown.
Definition pspusbbus.h:24
int num_interface
Number of interfaces.
Definition pspusbbus.h:26
USB driver interfaces structure.
Definition pspusbbus.h:107
unsigned int num
Number of interface descriptors.
Definition pspusbbus.h:111
struct InterfaceDescriptor * infp[2]
Pointers to the individual interface descriptors.
Definition pspusbbus.h:109
USB device request, used by sceUsbbdReqSend and sceUsbbdReqRecv.
Definition pspusbbus.h:217
int unk1c
Unknown.
Definition pspusbbus.h:233
void * func
Pointer to the function to call on completion.
Definition pspusbbus.h:227
struct UsbEndpoint * endp
Pointer to the endpoint to queue request on.
Definition pspusbbus.h:219
int unkc
Unknown.
Definition pspusbbus.h:225
int retcode
Return code of the request, 0 == success, -3 == cancelled.
Definition pspusbbus.h:231
void * data
Pointer to the data buffer to use in the request.
Definition pspusbbus.h:221
void * link
Link pointer to next request used by the driver, set it to NULL.
Definition pspusbbus.h:237
int recvsize
Resultant size (send == size of data sent, recv == size of data received)
Definition pspusbbus.h:229
int size
Size of the data buffer (send == size of data, recv == size of max receive)
Definition pspusbbus.h:223
void * arg
A user specified pointer for the device request.
Definition pspusbbus.h:235