vitasdk
Documentation of the vitasdk

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:




Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceUdcdForDriver_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (0x40, SceUdcdDeviceInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceUdcdWaitParam)
 
 VITASDK_BUILD_ASSERT_EQ (0x40, SceUdcdStringDescriptor)
 
struct SCE_ALIGN (4) SceUdcdDeviceDescriptor
 USB device descriptor. More...
 
 VITASDK_BUILD_ASSERT_EQ (0x14, SceUdcdDeviceDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (0xC, SceUdcdDeviceQualifierDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceUdcdConfigDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (0xC, SceUdcdInterfaceSettings)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceUdcdInterfaceDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceUdcdEndpointDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (0xC, SceUdcdInterface)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceUdcdEndpoint)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceUdcdConfiguration)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceUdcdEP0DeviceRequest)
 
 VITASDK_BUILD_ASSERT_EQ (0x54, SceUdcdDriver)
 
 VITASDK_BUILD_ASSERT_EQ (0x2C, SceUdcdDeviceRequest)
 
struct SCE_ALIGN (16) SceUdcdDriverName
 USB driver name. More...
 
 VITASDK_BUILD_ASSERT_EQ (((0x28+(0x10 - 1)) &~(0x10 - 1)), SceUdcdDriverName)
 
int ksceUdcdWaitBusInitialized (unsigned int timeout, int bus)
 Waits until an UDCD bus is initialized. More...
 
int ksceUdcdStart (const char *driverName, int size, void *args)
 Start a USB driver. More...
 
int ksceUdcdStartInternal (const char *driverName, int size, void *args, int bus)
 Start a USB driver for an UDCD bus. More...
 
int ksceUdcdStartCurrentInternal (int unused, int bus)
 Starts the current USB driver for an UDCD bus. More...
 
int ksceUdcdStop (const char *driverName, int size, void *args)
 Stop a USB driver. More...
 
int ksceUdcdStopInternal (const char *driverName, int size, void *args, int bus)
 Stop a USB driver for an UDCD bus. More...
 
int ksceUdcdStopCurrentInternal (int bus)
 Stops the current USB driver for an UDCD bus. More...
 
int ksceUdcdActivate (unsigned int productId)
 Activate a USB driver. More...
 
int ksceUdcdActivateInternal (unsigned int productId, unsigned int bus_powered, int bus)
 Activate a USB driver for an UDCD bus. More...
 
int ksceUdcdDeactivate (void)
 Deactivate USB driver. More...
 
int ksceUdcdDeactivateInternal (int bus)
 Deactivate USB driver for an UDCD bus. More...
 
int ksceUdcdGetDeviceState (void)
 Get USB state. More...
 
int ksceUdcdGetDeviceStateInternal (int bus)
 Get USB state for an UDCD bus. More...
 
int ksceUdcdGetDeviceInfo (SceUdcdDeviceInfo *devInfo)
 Get device information. More...
 
int ksceUdcdGetDeviceInfoInternal (SceUdcdDeviceInfo *devInfo, int bus)
 Get device information for an UDCD bus. More...
 
int ksceUdcdGetDrvState (const char *driverName)
 Get state of a specific USB driver. More...
 
int ksceUdcdGetDrvStateInternal (const char *driverName, int bus)
 Get state of a specific USB driver for an UDCD bus. More...
 
int ksceUdcdWaitState (SceUdcdWaitParam *waitParam, unsigned int timeout)
 Wait for state. More...
 
int ksceUdcdWaitStateInternal (SceUdcdWaitParam *waitParam, unsigned int timeout, int bus)
 Wait for state for an UDCD bus. More...
 
int ksceUdcdRegister (SceUdcdDriver *drv)
 Register a USB driver. More...
 
int ksceUdcdRegisterInternal (SceUdcdDriver *drv, int bus)
 Register a USB driver to a specific USB bus. More...
 
int ksceUdcdUnregister (SceUdcdDriver *drv)
 Unregister a USB driver. More...
 
int ksceUdcdUnregisterInternal (SceUdcdDriver *drv, int bus)
 Unregister a USB driver for an UDCD bus. More...
 
int ksceUdcdClearFIFO (SceUdcdEndpoint *endp)
 Clear the FIFO on an endpoint. More...
 
int ksceUdcdClearFIFOInternal (SceUdcdEndpoint *endp, int bus)
 Clear the FIFO on an endpoint for an UDCD bus. More...
 
int ksceUdcdReqCancelAll (SceUdcdEndpoint *endp)
 Cancel any pending requests on an endpoint. More...
 
int ksceUdcdStall (SceUdcdEndpoint *endp)
 Stall an endpoint. More...
 
int ksceUdcdStallInternal (SceUdcdEndpoint *endp, int bus)
 Stall an endpoint for an UDCD bus. More...
 
int ksceUdcdReqSend (SceUdcdDeviceRequest *req)
 Queue a send request (IN from host pov) More...
 
int ksceUdcdReqSendInternal (SceUdcdDeviceRequest *req, int bus)
 Queue a send request (IN from host pov) for an UDCD bus. More...
 
int ksceUdcdReqRecv (SceUdcdDeviceRequest *req)
 Queue a receive request (OUT from host pov) More...
 
int ksceUdcdReqRecvInternal (SceUdcdDeviceRequest *req, int bus)
 Queue a receive request (OUT from host pov) for an UDCD bus. More...
 

Macros

#define USB_DT_DEVICE_SIZE   18
 Descriptor sizes per descriptor type. More...
 
#define USB_DT_CONFIG_SIZE   9
 
#define USB_DT_INTERFACE_SIZE   9
 
#define USB_DT_ENDPOINT_SIZE   7
 
#define USB_DT_ENDPOINT_AUDIO_SIZE   9
 Audio extension. More...
 
#define USB_DT_HUB_NONVAR_SIZE   7
 
#define USB_CTRLTYPE_DIR_MASK   0x80
 Control message request type bitmask. More...
 
#define USB_CTRLTYPE_DIR_HOST2DEVICE   (0 << 7)
 
#define USB_CTRLTYPE_DIR_DEVICE2HOST   (1 << 7)
 
#define USB_CTRLTYPE_TYPE_MASK   0x60
 
#define USB_CTRLTYPE_TYPE_STANDARD   (0 << 5)
 
#define USB_CTRLTYPE_TYPE_CLASS   (1 << 5)
 
#define USB_CTRLTYPE_TYPE_VENDOR   (2 << 5)
 
#define USB_CTRLTYPE_TYPE_RESERVED   (3 << 5)
 
#define USB_CTRLTYPE_REC_MASK   0x1f
 
#define USB_CTRLTYPE_REC_DEVICE   0
 
#define USB_CTRLTYPE_REC_INTERFACE   1
 
#define USB_CTRLTYPE_REC_ENDPOINT   2
 
#define USB_CTRLTYPE_REC_OTHER   3
 
#define USB_ENDPOINT_ADDRESS_MASK   0x0f /* in bEndpointAddress */
 Endpoint types and masks. More...
 
#define USB_ENDPOINT_DIR_MASK   0x80
 
#define USB_FEATURE_ENDPOINT_HALT   0
 
#define USB_ENDPOINT_IN   0x80
 
#define USB_ENDPOINT_OUT   0x00
 
#define USB_ENDPOINT_TYPE_MASK   0x03 /* in bmAttributes */
 
#define USB_ENDPOINT_TYPE_CONTROL   0
 
#define USB_ENDPOINT_TYPE_ISOCHRONOUS   1
 
#define USB_ENDPOINT_TYPE_BULK   2
 
#define USB_ENDPOINT_TYPE_INTERRUPT   3
 
#define HID_INTF   0x03
 HID Interface Class Code. More...
 
#define BOOT_INTF_SUBCLASS   0x01
 HID Interface Class SubClass Codes. More...
 
#define SCE_UDCD_MAX_INTERFACES   8
 USB limits. More...
 
#define SCE_UDCD_MAX_ENDPOINTS   9
 
#define SCE_UDCD_MAX_ALTERNATE   2
 

Data Structure Documentation

◆ SceUdcdDeviceInfo

struct SceUdcdDeviceInfo
Data Fields
unsigned char info[64]

◆ SceUdcdWaitParam

struct SceUdcdWaitParam
Data Fields
int unk_00
int status
int unk_08
int unk_0C
int unk_10
const char * driverName

◆ SceUdcdStringDescriptor

struct SceUdcdStringDescriptor

USB string descriptor.

Data Fields
unsigned char bLength
unsigned char bDescriptorType
short bString[31]

◆ SceUdcdConfigDescriptor

struct SceUdcdConfigDescriptor

USB configuration descriptor.

Data Fields
unsigned char bLength
unsigned char bDescriptorType
unsigned short wTotalLength
unsigned char bNumInterfaces
unsigned char bConfigurationValue
unsigned char iConfiguration
unsigned char bmAttributes
unsigned char bMaxPower
struct SceUdcdInterfaceSettings * settings
unsigned char * extra Extra descriptors.
int extraLength

◆ SceUdcdInterfaceSettings

struct SceUdcdInterfaceSettings

USB driver interfaces structure.

Data Fields
struct SceUdcdInterfaceDescriptor * descriptors Pointers to the individual interface descriptors.
unsigned int alternateSetting
unsigned int numDescriptors Number of interface descriptors.

◆ SceUdcdInterfaceDescriptor

struct SceUdcdInterfaceDescriptor

USB Interface descriptor.

Data Fields
unsigned char bLength
unsigned char bDescriptorType
unsigned char bInterfaceNumber
unsigned char bAlternateSetting
unsigned char bNumEndpoints
unsigned char bInterfaceClass
unsigned char bInterfaceSubClass
unsigned char bInterfaceProtocol
unsigned char iInterface
struct SceUdcdEndpointDescriptor * endpoints
unsigned char * extra Extra descriptors.
int extraLength

◆ SceUdcdEndpointDescriptor

struct SceUdcdEndpointDescriptor

USB endpoint descriptor.

Data Fields
unsigned char bLength
unsigned char bDescriptorType
unsigned char bEndpointAddress
unsigned char bmAttributes
unsigned short wMaxPacketSize
unsigned char bInterval
unsigned char * extra Extra descriptors.
int extraLength

◆ SceUdcdInterface

struct SceUdcdInterface

USB driver interface.

Data Fields
int expectNumber Expectant interface number (interface number or -1)
int interfaceNumber End interface.
int numInterfaces Number of interfaces.

◆ SceUdcdEndpoint

struct SceUdcdEndpoint

USB driver endpoint.

Data Fields
int direction USB_ENDPOINT_IN / USB_ENDPOINT_OUT.
int driverEndpointNumber Driver Endpoint number (must be filled in sequentially)
int endpointNumber Endpoint number (Filled in by the bus driver)
int transmittedBytes Number of transmitted bytes.

◆ SceUdcdConfiguration

struct SceUdcdConfiguration

USB driver configuration.

Data Fields
SceUdcdConfigDescriptor * configDescriptors Pointer to the configuration descriptors.
SceUdcdInterfaceSettings * settings USB driver interface settings.
SceUdcdInterfaceDescriptor * interfaceDescriptors Pointer to the first interface descriptor.
SceUdcdEndpointDescriptor * endpointDescriptors Pointer to the first endpoint descriptor.

◆ SceUdcdEP0DeviceRequest

struct SceUdcdEP0DeviceRequest

USB EP0 Device Request.

Data Fields
unsigned char bmRequestType
unsigned char bRequest
unsigned short wValue
unsigned short wIndex
unsigned short wLength

◆ SceUdcdDriver

struct SceUdcdDriver

USB driver structure.

Data Fields

const char * driverName
 Name of the USB driver. More...
 
int numEndpoints
 Number of endpoints in this driver (including default control) More...
 
SceUdcdEndpointendpoints
 List of endpoint structures (used when calling other functions) More...
 
SceUdcdInterfaceinterface
 Interface list. More...
 
SceUdcdDeviceDescriptordescriptor_hi
 Pointer to hi-speed device descriptor. More...
 
SceUdcdConfigurationconfiguration_hi
 Pointer to hi-speed device configuration. More...
 
SceUdcdDeviceDescriptordescriptor
 Pointer to full-speed device descriptor. More...
 
SceUdcdConfigurationconfiguration
 Pointer to full-speed device configuration. More...
 
SceUdcdStringDescriptorstringDescriptors
 Default string descriptors. More...
 
SceUdcdStringDescriptorstringDescriptorProduct
 Product string descriptor (iProduct has to be 2) More...
 
SceUdcdStringDescriptorstringDescriptorSerial
 Serial string descriptor (iSerial has to be 3) More...
 
int(* processRequest )(int recipient, int arg, SceUdcdEP0DeviceRequest *req, void *user_data)
 Received a control request. More...
 
int(* changeSetting )(int interfaceNumber, int alternateSetting, int bus)
 Change alternate setting. More...
 
int(* attach )(int usb_version, void *user_data)
 Configuration set (attach) function. More...
 
void(* detach )(void *user_data)
 Configuration unset (detach) function. More...
 
void(* configure )(int usb_version, int desc_count, SceUdcdInterfaceSettings *settings, void *user_data)
 Configure the device. More...
 
int(* start )(int size, void *args, void *user_data)
 Function called when the driver is started. More...
 
int(* stop )(int size, void *args, void *user_data)
 Function called when the driver is stopped. More...
 
void * user_data
 User data. More...
 
int bus
 USB bus. More...
 
struct SceUdcdDriverlink
 Link to next USB driver in the chain, set to NULL. More...
 

◆ SceUdcdDeviceRequest

struct SceUdcdDeviceRequest

USB device request.

Data Fields

SceUdcdEndpointendpoint
 Pointer to the endpoint to queue request on. More...
 
void * data
 Pointer to the data buffer to use in the request. More...
 
unsigned int attributes
 Request attributes (See SceUdcdDeviceRequestAttr) More...
 
int size
 Size of the data buffer. More...
 
int isControlRequest
 Is a control request? More...
 
void(* onComplete )(struct SceUdcdDeviceRequest *req)
 Pointer to the function to call on completion. More...
 
int transmitted
 Number of transmitted bytes. More...
 
int returnCode
 Return code of the request (See SceUdcdRetcode) More...
 
struct SceUdcdDeviceRequestnext
 Link pointer to next request used by the driver, set it to NULL. More...
 
void * unused
 An unused value (maybe an argument) More...
 
void * physicalAddress
 Physical address. More...
 

Macro Definition Documentation

◆ USB_DT_DEVICE_SIZE

#define USB_DT_DEVICE_SIZE   18

Descriptor sizes per descriptor type.

◆ USB_DT_CONFIG_SIZE

#define USB_DT_CONFIG_SIZE   9

◆ USB_DT_INTERFACE_SIZE

#define USB_DT_INTERFACE_SIZE   9

◆ USB_DT_ENDPOINT_SIZE

#define USB_DT_ENDPOINT_SIZE   7

◆ USB_DT_ENDPOINT_AUDIO_SIZE

#define USB_DT_ENDPOINT_AUDIO_SIZE   9

Audio extension.

◆ USB_DT_HUB_NONVAR_SIZE

#define USB_DT_HUB_NONVAR_SIZE   7

◆ USB_CTRLTYPE_DIR_MASK

#define USB_CTRLTYPE_DIR_MASK   0x80

Control message request type bitmask.

◆ USB_CTRLTYPE_DIR_HOST2DEVICE

#define USB_CTRLTYPE_DIR_HOST2DEVICE   (0 << 7)

◆ USB_CTRLTYPE_DIR_DEVICE2HOST

#define USB_CTRLTYPE_DIR_DEVICE2HOST   (1 << 7)

◆ USB_CTRLTYPE_TYPE_MASK

#define USB_CTRLTYPE_TYPE_MASK   0x60

◆ USB_CTRLTYPE_TYPE_STANDARD

#define USB_CTRLTYPE_TYPE_STANDARD   (0 << 5)

◆ USB_CTRLTYPE_TYPE_CLASS

#define USB_CTRLTYPE_TYPE_CLASS   (1 << 5)

◆ USB_CTRLTYPE_TYPE_VENDOR

#define USB_CTRLTYPE_TYPE_VENDOR   (2 << 5)

◆ USB_CTRLTYPE_TYPE_RESERVED

#define USB_CTRLTYPE_TYPE_RESERVED   (3 << 5)

◆ USB_CTRLTYPE_REC_MASK

#define USB_CTRLTYPE_REC_MASK   0x1f

◆ USB_CTRLTYPE_REC_DEVICE

#define USB_CTRLTYPE_REC_DEVICE   0

◆ USB_CTRLTYPE_REC_INTERFACE

#define USB_CTRLTYPE_REC_INTERFACE   1

◆ USB_CTRLTYPE_REC_ENDPOINT

#define USB_CTRLTYPE_REC_ENDPOINT   2

◆ USB_CTRLTYPE_REC_OTHER

#define USB_CTRLTYPE_REC_OTHER   3

◆ USB_ENDPOINT_ADDRESS_MASK

#define USB_ENDPOINT_ADDRESS_MASK   0x0f /* in bEndpointAddress */

Endpoint types and masks.

◆ USB_ENDPOINT_DIR_MASK

#define USB_ENDPOINT_DIR_MASK   0x80

◆ USB_FEATURE_ENDPOINT_HALT

#define USB_FEATURE_ENDPOINT_HALT   0

◆ USB_ENDPOINT_IN

#define USB_ENDPOINT_IN   0x80

◆ USB_ENDPOINT_OUT

#define USB_ENDPOINT_OUT   0x00

◆ USB_ENDPOINT_TYPE_MASK

#define USB_ENDPOINT_TYPE_MASK   0x03 /* in bmAttributes */

◆ USB_ENDPOINT_TYPE_CONTROL

#define USB_ENDPOINT_TYPE_CONTROL   0

◆ USB_ENDPOINT_TYPE_ISOCHRONOUS

#define USB_ENDPOINT_TYPE_ISOCHRONOUS   1

◆ USB_ENDPOINT_TYPE_BULK

#define USB_ENDPOINT_TYPE_BULK   2

◆ USB_ENDPOINT_TYPE_INTERRUPT

#define USB_ENDPOINT_TYPE_INTERRUPT   3

◆ HID_INTF

#define HID_INTF   0x03

HID Interface Class Code.

◆ BOOT_INTF_SUBCLASS

#define BOOT_INTF_SUBCLASS   0x01

HID Interface Class SubClass Codes.

◆ SCE_UDCD_MAX_INTERFACES

#define SCE_UDCD_MAX_INTERFACES   8

USB limits.

◆ SCE_UDCD_MAX_ENDPOINTS

#define SCE_UDCD_MAX_ENDPOINTS   9

◆ SCE_UDCD_MAX_ALTERNATE

#define SCE_UDCD_MAX_ALTERNATE   2

Enumeration Type Documentation

◆ SceUdcdStatus

Enumerator
SCE_UDCD_STATUS_CONNECTION_NEW 
SCE_UDCD_STATUS_CONNECTION_ESTABLISHED 
SCE_UDCD_STATUS_CONNECTION_SUSPENDED 
SCE_UDCD_STATUS_CABLE_DISCONNECTED 
SCE_UDCD_STATUS_CABLE_CONNECTED 
SCE_UDCD_STATUS_DEACTIVATED 
SCE_UDCD_STATUS_ACTIVATED 
SCE_UDCD_STATUS_IS_CHARGING 
SCE_UDCD_STATUS_USE_USB_CHARGING 
SCE_UDCD_STATUS_UNKNOWN_1000 
SCE_UDCD_STATUS_UNKNOWN_2000 

◆ SceUdcdStatusDriver

Enumerator
SCE_UDCD_STATUS_DRIVER_STARTED 
SCE_UDCD_STATUS_DRIVER_REGISTERED 

◆ SceUdcdUsbClass

Enumeration for Device and/or Interface Class codes.

Enumerator
USB_CLASS_PER_INTERFACE 

for DeviceClass

USB_CLASS_AUDIO 
USB_CLASS_COMM 
USB_CLASS_HID 
USB_CLASS_PTP 
USB_CLASS_PRINTER 
USB_CLASS_MASS_STORAGE 
USB_CLASS_HUB 
USB_CLASS_DATA 
USB_CLASS_VIDEO 
USB_CLASS_VENDOR_SPEC 

◆ SceUdcdUsbDt

Enumeration for descriptor types.

Enumerator
USB_DT_DEVICE 
USB_DT_CONFIG 
USB_DT_STRING 
USB_DT_INTERFACE 
USB_DT_ENDPOINT 

◆ SceUdcdUsbReq

Enumeration for standard requests.

Enumerator
USB_REQ_GET_STATUS 
USB_REQ_CLEAR_FEATURE 
USB_REQ_SET_FEATURE 
USB_REQ_SET_ADDRESS 
USB_REQ_GET_DESCRIPTOR 
USB_REQ_SET_DESCRIPTOR 
USB_REQ_GET_CONFIG 
USB_REQ_SET_CONFIG 
USB_REQ_GET_INTERFACE 
USB_REQ_SET_INTERFACE 
USB_REQ_SYNC_FRAME 

◆ SceUdcdHidRequest

Class-Specific Requests.

Enumerator
HID_REQUEST_GET_REPORT 
HID_REQUEST_GET_IDLE 
HID_REQUEST_GET_PROTOCOL 
HID_REQUEST_SET_REPORT 
HID_REQUEST_SET_IDLE 
HID_REQUEST_SET_PROTOCOL 

◆ SceUdcdHidDescriptor

Class Descriptor Types.

Enumerator
HID_DESCRIPTOR_HID 
HID_DESCRIPTOR_REPORT 
HID_DESRIPTOR_PHY 

◆ SceUdcdProtocol

Protocol Selection.

Enumerator
BOOT_PROTOCOL 
RPT_PROTOCOL 

◆ SceUdcdHidProtocol

HID Interface Class Protocol Codes.

Enumerator
HID_PROTOCOL_NONE 
HID_PROTOCOL_KEYBOARD 
HID_PROTOCOL_MOUSE 

◆ SceUdcdRetcode

Enumerator
SCE_UDCD_RETCODE_CANCEL 
SCE_UDCD_RETCODE_CANCEL_ALL 
SCE_UDCD_RETCODE_CANCEL_TRANSMISSION 
SCE_UDCD_RETCODE_SUCCESS 
SCE_UDCD_RETCODE_SEND 
SCE_UDCD_RETCODE_RECV 

◆ SceUdcdErrorCode

Error codes.

Enumerator
SCE_UDCD_ERROR_ILLEGAL_CONTEXT 
SCE_UDCD_ERROR_INVALID_POINTER 
SCE_UDCD_ERROR_INVALID_FLAG 
SCE_UDCD_ERROR_INVALID_VALUE 
SCE_UDCD_ERROR_ALREADY_DONE 
SCE_UDCD_ERROR_INVALID_ARGUMENT 
SCE_UDCD_ERROR_ARGUMENT_EXCEEDED_LIMIT 
SCE_UDCD_ERROR_MEMORY_EXHAUSTED 
SCE_UDCD_ERROR_DRIVER_NOT_FOUND 
SCE_UDCD_ERROR_DRIVER_IN_PROGRESS 
SCE_UDCD_ERROR_BUS_DRIVER_NOT_STARTED 
SCE_UDCD_ERROR_WAIT_TIMEOUT 
SCE_UDCD_ERROR_WAIT_CANCEL 
SCE_UDCD_ERROR_USBDRIVER_INVALID_DRIVER 
SCE_UDCD_ERROR_USBDRIVER_INVALID_NAME 
SCE_UDCD_ERROR_USBDRIVER_INVALID_FUNCS 

◆ SceUdcdDeviceRequestAttr

SceUdcdDeviceRequest Flags.

Enumerator
SCE_UDCD_DEVICE_REQUEST_ATTR_PHYCONT 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/16]

VITASDK_BUILD_ASSERT_EQ ( 0x40  ,
SceUdcdDeviceInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/16]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceUdcdWaitParam   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/16]

VITASDK_BUILD_ASSERT_EQ ( 0x40  ,
SceUdcdStringDescriptor   
)

◆ SCE_ALIGN() [1/2]

struct SCE_ALIGN ( )

USB device descriptor.

USB device qualifier descriptor.

◆ VITASDK_BUILD_ASSERT_EQ() [4/16]

VITASDK_BUILD_ASSERT_EQ ( 0x14  ,
SceUdcdDeviceDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/16]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceUdcdDeviceQualifierDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/16]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceUdcdConfigDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [7/16]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceUdcdInterfaceSettings   
)

◆ VITASDK_BUILD_ASSERT_EQ() [8/16]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceUdcdInterfaceDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [9/16]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceUdcdEndpointDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [10/16]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceUdcdInterface   
)

◆ VITASDK_BUILD_ASSERT_EQ() [11/16]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceUdcdEndpoint   
)

◆ VITASDK_BUILD_ASSERT_EQ() [12/16]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceUdcdConfiguration   
)

◆ VITASDK_BUILD_ASSERT_EQ() [13/16]

VITASDK_BUILD_ASSERT_EQ ( ,
SceUdcdEP0DeviceRequest   
)

◆ VITASDK_BUILD_ASSERT_EQ() [14/16]

VITASDK_BUILD_ASSERT_EQ ( 0x54  ,
SceUdcdDriver   
)

◆ VITASDK_BUILD_ASSERT_EQ() [15/16]

VITASDK_BUILD_ASSERT_EQ ( 0x2C  ,
SceUdcdDeviceRequest   
)

◆ SCE_ALIGN() [2/2]

struct SCE_ALIGN ( 16  )

USB driver name.

◆ VITASDK_BUILD_ASSERT_EQ() [16/16]

VITASDK_BUILD_ASSERT_EQ ( ((0x28+(0x10 - 1)) &~(0x10 - 1))  ,
SceUdcdDriverName   
)

◆ ksceUdcdWaitBusInitialized()

int ksceUdcdWaitBusInitialized ( unsigned int  timeout,
int  bus 
)

Waits until an UDCD bus is initialized.

Parameters
[in]timeout- Timeout
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error.

◆ ksceUdcdStart()

int ksceUdcdStart ( const char *  driverName,
int  size,
void *  args 
)

Start a USB driver.

Parameters
driverName- Name of the USB driver to start
size- Size of arguments to pass to USB driver start
args- Arguments to pass to USB driver start
Returns
0 on success, < 0 on error.

◆ ksceUdcdStartInternal()

int ksceUdcdStartInternal ( const char *  driverName,
int  size,
void *  args,
int  bus 
)

Start a USB driver for an UDCD bus.

Parameters
driverName- Name of the USB driver to start
size- Size of arguments to pass to USB driver start
args- Arguments to pass to USB driver start
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error.

◆ ksceUdcdStartCurrentInternal()

int ksceUdcdStartCurrentInternal ( int  unused,
int  bus 
)

Starts the current USB driver for an UDCD bus.

Parameters
[in]unused- Unused
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error.

◆ ksceUdcdStop()

int ksceUdcdStop ( const char *  driverName,
int  size,
void *  args 
)

Stop a USB driver.

Parameters
driverName- Name of the USB driver to stop
size- Size of arguments to pass to USB driver start
args- Arguments to pass to USB driver start
Returns
0 on success, < 0 on error.

◆ ksceUdcdStopInternal()

int ksceUdcdStopInternal ( const char *  driverName,
int  size,
void *  args,
int  bus 
)

Stop a USB driver for an UDCD bus.

Parameters
driverName- Name of the USB driver to stop
size- Size of arguments to pass to USB driver start
args- Arguments to pass to USB driver start
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error.

◆ ksceUdcdStopCurrentInternal()

int ksceUdcdStopCurrentInternal ( int  bus)

Stops the current USB driver for an UDCD bus.

Parameters
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error.

◆ ksceUdcdActivate()

int ksceUdcdActivate ( unsigned int  productId)

Activate a USB driver.

Parameters
pid- Product ID for the default USB Driver
Returns
0 on success, < 0 on error.

◆ ksceUdcdActivateInternal()

int ksceUdcdActivateInternal ( unsigned int  productId,
unsigned int  bus_powered,
int  bus 
)

Activate a USB driver for an UDCD bus.

Parameters
pid- Product ID for the default USB Driver
[in]bus_powered- Enable USB bus power
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error.

◆ ksceUdcdDeactivate()

int ksceUdcdDeactivate ( void  )

Deactivate USB driver.

Returns
0 on success, < 0 on error.

◆ ksceUdcdDeactivateInternal()

int ksceUdcdDeactivateInternal ( int  bus)

Deactivate USB driver for an UDCD bus.

Parameters
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error.

◆ ksceUdcdGetDeviceState()

int ksceUdcdGetDeviceState ( void  )

Get USB state.

Returns
One or more SceUdcdStatus.

◆ ksceUdcdGetDeviceStateInternal()

int ksceUdcdGetDeviceStateInternal ( int  bus)

Get USB state for an UDCD bus.

Parameters
[in]bus- UDCD bus (default is 2)
Returns
One or more SceUdcdStatus.

◆ ksceUdcdGetDeviceInfo()

int ksceUdcdGetDeviceInfo ( SceUdcdDeviceInfo devInfo)

Get device information.

Parameters
[out]devInfo- Device information
Returns
0 on success, < 0 on error.

◆ ksceUdcdGetDeviceInfoInternal()

int ksceUdcdGetDeviceInfoInternal ( SceUdcdDeviceInfo devInfo,
int  bus 
)

Get device information for an UDCD bus.

Parameters
[out]devInfo- Device information
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error.

◆ ksceUdcdGetDrvState()

int ksceUdcdGetDrvState ( const char *  driverName)

Get state of a specific USB driver.

Parameters
driverName- name of USB driver to get status from
Returns
SCE_UDCD_STATUS_DRIVER_STARTED if the driver has been started, SCE_UDCD_STATUS_DRIVER_REGISTERED if it is stopped

◆ ksceUdcdGetDrvStateInternal()

int ksceUdcdGetDrvStateInternal ( const char *  driverName,
int  bus 
)

Get state of a specific USB driver for an UDCD bus.

Parameters
driverName- name of USB driver to get status from
[in]bus- UDCD bus (default is 2)
Returns
SCE_UDCD_STATUS_DRIVER_STARTED if the driver has been started, SCE_UDCD_STATUS_DRIVER_REGISTERED if it is stopped

◆ ksceUdcdWaitState()

int ksceUdcdWaitState ( SceUdcdWaitParam waitParam,
unsigned int  timeout 
)

Wait for state.

Parameters
[in]waitParam- Wait parameter
[in]timeout- Timeout
Returns
0 on success, < 0 on error.

◆ ksceUdcdWaitStateInternal()

int ksceUdcdWaitStateInternal ( SceUdcdWaitParam waitParam,
unsigned int  timeout,
int  bus 
)

Wait for state for an UDCD bus.

Parameters
[in]waitParam- Wait parameter
[in]timeout- Timeout
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error.

◆ ksceUdcdRegister()

int ksceUdcdRegister ( SceUdcdDriver drv)

Register a USB driver.

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

◆ ksceUdcdRegisterInternal()

int ksceUdcdRegisterInternal ( SceUdcdDriver drv,
int  bus 
)

Register a USB driver to a specific USB bus.

Parameters
drv- Pointer to a filled out USB driver
bus- The USB bus index (usually 2)
Returns
0 on success, < 0 on error

◆ ksceUdcdUnregister()

int ksceUdcdUnregister ( SceUdcdDriver drv)

Unregister a USB driver.

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

◆ ksceUdcdUnregisterInternal()

int ksceUdcdUnregisterInternal ( SceUdcdDriver drv,
int  bus 
)

Unregister a USB driver for an UDCD bus.

Parameters
drv- Pointer to a filled out USB driver
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error

◆ ksceUdcdClearFIFO()

int ksceUdcdClearFIFO ( SceUdcdEndpoint endp)

Clear the FIFO on an endpoint.

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

◆ ksceUdcdClearFIFOInternal()

int ksceUdcdClearFIFOInternal ( SceUdcdEndpoint endp,
int  bus 
)

Clear the FIFO on an endpoint for an UDCD bus.

Parameters
endp- The endpoint to clear
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error

◆ ksceUdcdReqCancelAll()

int ksceUdcdReqCancelAll ( SceUdcdEndpoint endp)

Cancel any pending requests on an endpoint.

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

◆ ksceUdcdStall()

int ksceUdcdStall ( SceUdcdEndpoint endp)

Stall an endpoint.

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

◆ ksceUdcdStallInternal()

int ksceUdcdStallInternal ( SceUdcdEndpoint endp,
int  bus 
)

Stall an endpoint for an UDCD bus.

Parameters
endp- The endpoint to stall
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error

◆ ksceUdcdReqSend()

int ksceUdcdReqSend ( SceUdcdDeviceRequest req)

Queue a send request (IN from host pov)

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

◆ ksceUdcdReqSendInternal()

int ksceUdcdReqSendInternal ( SceUdcdDeviceRequest req,
int  bus 
)

Queue a send request (IN from host pov) for an UDCD bus.

Parameters
req- Pointer to a filled out SceUdcdDeviceRequest structure.
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error

◆ ksceUdcdReqRecv()

int ksceUdcdReqRecv ( SceUdcdDeviceRequest req)

Queue a receive request (OUT from host pov)

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

◆ ksceUdcdReqRecvInternal()

int ksceUdcdReqRecvInternal ( SceUdcdDeviceRequest req,
int  bus 
)

Queue a receive request (OUT from host pov) for an UDCD bus.

Parameters
req- Pointer to a filled out SceUdcdDeviceRequest structure
[in]bus- UDCD bus (default is 2)
Returns
0 on success, < 0 on error