vitasdk
Documentation of the vitasdk

Exports for Kernel. More...

Data Structures

struct  SceUsbdDeviceDescriptor
 
struct  SceUsbdConfigurationDescriptor
 
struct  SceUsbdInterfaceDescriptor
 
struct  SceUsbdEndpointDescriptor
 
struct  SceUsbdStringDescriptor
 
struct  SceUsbdHidSubDescriptorInfo
 
struct  SceUsbdHidDescriptor
 
struct  SceUsbdDeviceAddress
 
struct  SceUsbdDriver
 
struct  SceUsbdCompositeDriver
 
struct  SceUsbdDeviceRequest
 
struct  ksceUsbdIsochPswLen
 
struct  ksceUsbdIsochTransfer
 

Macros

#define SCE_USBD_CLASS_PER_INTERFACE   0x00
 
#define SCE_USBD_CLASS_AUDIO   0x01
 
#define SCE_USBD_CLASS_COMMUNICATIONS   0x02
 
#define SCE_USBD_CLASS_HID   0x03
 
#define SCE_USBD_CLASS_MONITOR   0x04
 
#define SCE_USBD_CLASS_PHYSICAL   0x05
 
#define SCE_USBD_CLASS_POWER   0x06
 
#define SCE_USBD_CLASS_PRINTER   0x07
 
#define SCE_USBD_CLASS_STORAGE   0x08
 
#define SCE_USBD_CLASS_HUB   0x09
 
#define SCE_USBD_CLASS_DATA   0x0a
 
#define SCE_USBD_CLASS_VENDOR_SPECIFIC   0xff
 
#define SCE_USBD_CONFIGURATION_RESERVED_ZERO   0x1f
 
#define SCE_USBD_CONFIGURATION_REMOTE_WAKEUP   0x20
 
#define SCE_USBD_CONFIGURATION_SELF_POWERED   0x40
 
#define SCE_USBD_CONFIGURATION_RESERVED_ONE   0x80
 
#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_BITS   0x03
 
#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_SHIFT   0
 
#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_CONTROL   0x00
 
#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_ISOCHRONOUS   0x01
 
#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_BULK   0x02
 
#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_INTERRUPT   0x03
 
#define SCE_USBD_ENDPOINT_NUMBER_BITS   0x1f
 
#define SCE_USBD_ENDPOINT_NUMBER_SHIFT   0
 
#define SCE_USBD_ENDPOINT_DIRECTION_BITS   0x80
 
#define SCE_USBD_ENDPOINT_DIRECTION_SHIFT   7
 
#define SCE_USBD_ENDPOINT_DIRECTION_OUT   0x00
 
#define SCE_USBD_ENDPOINT_DIRECTION_IN   0x80
 
#define SCE_USBD_PROBE_SUCCEEDED   (0)
 
#define SCE_USBD_PROBE_FAILED   (-1)
 
#define SCE_USBD_ATTACH_SUCCEEDED   (0)
 
#define SCE_USBD_ATTACH_FAILED   (-1)
 
#define SCE_USBD_DETACH_SUCCEEDED   (0)
 
#define SCE_USBD_DETACH_FAILED   (-1)
 
#define SCE_USBD_MAX_LS_CONTROL_PACKET_SIZE   8
 
#define SCE_USBD_MAX_FS_CONTROL_PACKET_SIZE   64
 
#define SCE_USBD_MAX_ISOCHRONOUS_PACKET_SIZE   1023
 
#define SCE_USBD_MAX_LS_INTERRUPT_PACKET_SIZE   8
 
#define SCE_USBD_MAX_FS_INTERRUPT_PACKET_SIZE   64
 
#define SCE_USBD_MAX_BULK_PACKET_SIZE   64
 
#define SCE_USBD_FEATURE_ENDPOINT_HALT   0x00
 
#define SCE_USBD_FEATURE_DEVICE_REMOTE_WAKEUP   0x01
 
#define SCE_USBD_DEVICE_SPEED_LS   (0)
 
#define SCE_USBD_DEVICE_SPEED_FS   (1)
 
#define SCE_USBD_DEVICE_SPEED_HS   (2)
 
#define ksceUsbdSetConfiguration(pid, config, cb, arg)
 
#define ksceUsbdSetConfiguration(pid, config, cb, arg)
 
#define ksceUsbdClearDeviceFeature(pid, fs, cb, arg)
 
#define ksceUsbdClearInterfaceFeature(pid, fs, interface, cb, arg)
 
#define ksceUsbdClearEndpointFeature(pid, fs, endpoint, cb, arg)
 
#define ksceUsbdGetConfiguration(pid, ptr, cb, arg)
 
#define ksceUsbdGetDescriptor(pid, type, index, lang_id, ptr, len, cb, arg)
 
#define ksceUsbdGetInterface(pid, interface, ptr, cb, arg)
 
#define ksceUsbdGetDeviceStatus(pid, ptr, cb, arg)
 
#define ksceUsbdGetInterfaceStatus(pid, interface, ptr, cb, arg)
 
#define ksceUsbdGetEndpointStatus(pid, endpoint, ptr, cb, arg)
 
#define ksceUsbdSetAddress(pid, address, cb, arg)
 
#define ksceUsbdSetDeviceDescriptor(pid, type, index, lang_id, ptr, len, cb, arg)
 
#define ksceUsbdSetInterfaceDescriptor(pid, type, index, lang_id, ptr, len, cb, arg)
 
#define ksceUsbdSetEndpointDescriptor(pid, type, index, lang_id, ptr, len, cb, arg)
 
#define ksceUsbdSetDeviceFeature(pid, fs, cb, arg)
 
#define ksceUsbdSetInterfaceFeature(pid, fs, interface, cb, arg)
 
#define ksceUsbdSetEndpointFeature(pid, fs, endpoint, cb, arg)
 
#define ksceUsbdSetInterface(pid, interface, alt_setting, cb, arg)
 
#define ksceUsbdSynchFrame(pid, endpoint, pfn, cb, arg)
 
#define OHCI_CC_NO_ERROR   0x0
 
#define OHCI_CC_CRC   0x1
 
#define OHCI_CC_BIT_STUFFING   0x2
 
#define OHCI_CC_DATA_TOGGLE_MISMATCH   0x3
 
#define OHCI_CC_STALL   0x4
 
#define OHCI_CC_DEVICE_NOT_RESPONDING   0x5
 
#define OHCI_CC_PID_CHECK_FAILURE   0x6
 
#define OHCI_CC_UNEXPECTED_PID   0x7
 
#define OHCI_CC_DATA_OVERRUN   0x8
 
#define OHCI_CC_DATA_UNDERRUN   0x9
 
#define OHCI_CC_BUFFER_OVERRUN   0xc
 
#define OHCI_CC_BUFFER_UNDERRUN   0xd
 
#define OHCI_CC_NOT_ACCESSED1   0xe
 
#define OHCI_CC_NOT_ACCESSED2   0xf
 
#define EHCI_CC_MISSED_MICRO_FRAME   0x10
 
#define EHCI_CC_XACT   0x20
 
#define EHCI_CC_BABBLE   0x30
 
#define EHCI_CC_DATABUF   0x40
 
#define EHCI_CC_HALTED   0x50
 
#define USBD_CC_NOERR   0x0
 
#define USBD_CC_MISSED_MICRO_FRAME   0x1
 
#define USBD_CC_XACTERR   0x2
 
#define USBD_CC_BABBLE   0x4
 
#define USBD_CC_DATABUF   0x8
 

Typedefs

typedef void(* ksceUsbdDoneCallback) (int32_t result, int32_t count, void *arg)
 
typedef void(* ksceUsbdIsochDoneCallback) (int32_t result, ksceUsbdIsochTransfer *req, void *arg)
 

Enumerations

enum  SceUsbdErrorCode {
  SCE_USBD_ERROR_NOT_INITIALIZED = 0x80240001 , SCE_USBD_ERROR_ALREADY_INITIALIZED = 0x80240002 , SCE_USBD_ERROR_INVALID_PARAM = 0x80240003 , SCE_USBD_ERROR_PIPE_NOT_FOUND = 0x80240004 ,
  SCE_USBD_ERROR_NO_MEMORY = 0x80240005 , SCE_USBD_ERROR_DEVICE_NOT_FOUND = 0x80240006 , SCE_USBD_ERROR_80240007 = 0x80240007 , SCE_USBD_ERROR_80240009 = 0x80240009 ,
  SCE_USBD_ERROR_8024000A = 0x8024000A , SCE_USBD_ERROR_FATAL = 0x802400FF
}
 
enum  SceUsbdDescriptorType {
  SCE_USBD_DESCRIPTOR_DEVICE = 0x01 , SCE_USBD_DESCRIPTOR_CONFIGURATION = 0x02 , SCE_USBD_DESCRIPTOR_STRING = 0x03 , SCE_USBD_DESCRIPTOR_INTERFACE = 0x04 ,
  SCE_USBD_DESCRIPTOR_ENDPOINT = 0x05 , SCE_USBD_DESCRIPTOR_DEVICE_QUALIFIER = 0x06 , SCE_USBD_DESCRIPTOR_OTHER_SPEED = 0x07 , SCE_USBD_DESCRIPTOR_INTERFACE_POWER = 0x08 ,
  SCE_USBD_DESCRIPTOR_OTG = 0x09 , SCE_USBD_DESCRIPTOR_HID = 0x21 , SCE_USBD_DESCRIPTOR_REPORT = 0x22
}
 
enum  SceUsbdReqtype {
  SCE_USBD_REQTYPE_DIR_BITS = 0x80 , SCE_USBD_REQTYPE_DIR_TO_DEVICE = 0x00 , SCE_USBD_REQTYPE_DIR_TO_HOST = 0x80 , SCE_USBD_REQTYPE_TYPE_BITS = 0x60 ,
  SCE_USBD_REQTYPE_TYPE_STANDARD = 0x00 , SCE_USBD_REQTYPE_TYPE_CLASS = 0x20 , SCE_USBD_REQTYPE_TYPE_VENDOR = 0x40 , SCE_USBD_REQTYPE_TYPE_RESERVED = 0x60 ,
  SCE_USBD_REQTYPE_RECIP_BITS = 0x1f , SCE_USBD_REQTYPE_RECIP_DEVICE = 0x00 , SCE_USBD_REQTYPE_RECIP_INTERFACE = 0x01 , SCE_USBD_REQTYPE_RECIP_ENDPOINT = 0x02 ,
  SCE_USBD_REQTYPE_RECIP_OTHER = 0x03
}
 
enum  SceUsbdRequest {
  SCE_USBD_REQUEST_GET_STATUS = 0x00 , SCE_USBD_REQUEST_CLEAR_FEATURE = 0x01 , SCE_USBD_REQUEST_SET_FEATURE = 0x03 , SCE_USBD_REQUEST_SET_ADDRESS = 0x05 ,
  SCE_USBD_REQUEST_GET_DESCRIPTOR = 0x06 , SCE_USBD_REQUEST_SET_DESCRIPTOR = 0x07 , SCE_USBD_REQUEST_GET_CONFIGURATION = 0x08 , SCE_USBD_REQUEST_SET_CONFIGURATION = 0x09 ,
  SCE_USBD_REQUEST_GET_INTERFACE = 0x0a , SCE_USBD_REQUEST_SET_INTERFACE = 0x0b , SCE_USBD_REQUEST_SYNCH_FRAME = 0x0c
}
 

Functions

 VITASDK_BUILD_ASSERT_EQ (0x12, SceUsbdDeviceDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (0xA, SceUsbdConfigurationDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (9, SceUsbdInterfaceDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceUsbdEndpointDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (2, SceUsbdStringDescriptor)
 
 VITASDK_BUILD_ASSERT_EQ (3, SceUsbdHidSubDescriptorInfo)
 
 VITASDK_BUILD_ASSERT_EQ (6, SceUsbdHidDescriptor)
 
struct SceUsbdDeviceAddress __attribute__ ((packed)) SceUsbdDeviceAddress
 
 VITASDK_BUILD_ASSERT_EQ (6, SceUsbdDeviceAddress)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceUsbdDriver)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceUsbdCompositeDriver)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceUsbdDeviceRequest)
 
 VITASDK_BUILD_ASSERT_EQ (2, ksceUsbdIsochPswLen)
 
 VITASDK_BUILD_ASSERT_EQ (0x1C, ksceUsbdIsochTransfer)
 
int ksceUsbdRegisterDriver (const SceUsbdDriver *driver)
 Register USB driver.
 
int ksceUsbdRegisterCompositeLdd (const SceUsbdCompositeDriver *driver)
 Register USB driver for composite devices.
 
int ksceUsbdUnregisterDriver (const SceUsbdDriver *driver)
 De-register USB driver.
 
int ksceUsbdUnregisterCompositeLdd (const SceUsbdCompositeDriver *driver)
 De-register USB driver for composite devices.
 
void * ksceUsbdScanStaticDescriptor (SceUID device_id, void *start, SceUsbdDescriptorType type)
 Return usb descriptor.
 
SceUID ksceUsbdOpenPipe (int device_id, SceUsbdEndpointDescriptor *endpoint)
 Open communication pipe to endpoint.
 
int ksceUsbdClosePipe (SceUID pipe_id)
 Close communication pipe to endpoint.
 
int ksceUsbdControlTransfer (SceUID pipe_id, const SceUsbdDeviceRequest *req, unsigned char *buffer, ksceUsbdDoneCallback cb, void *user_data)
 Transfer data to/from endpoint.
 
int ksceUsbdInterruptTransfer (SceUID pipe_id, unsigned char *buffer, SceSize length, ksceUsbdDoneCallback cb, void *user_data)
 Transfer data to/from interrupt endpoint.
 
int ksceUsbdIsochronousTransfer (SceUID pipe_id, ksceUsbdIsochTransfer *transfer, ksceUsbdIsochDoneCallback cb, void *user_data)
 Transfer isochronous data to/from endpoint.
 
int ksceUsbdBulkTransfer (SceUID pipe_id, unsigned char *buffer, unsigned int length, ksceUsbdDoneCallback cb, void *user_data)
 Transfer data to/from endpoint.
 
int ksceUsbdBulkTransfer2 (int pipe_id, unsigned char *buffer, unsigned int length, ksceUsbdDoneCallback cb, void *user_data)
 Transfer data to/from endpoint.
 
int ksceUsbdGetDeviceLocation (SceUID device_id, uint8_t *location)
 Get device location.
 
int ksceUsbdSuspend (int port)
 
int ksceUsbdSuspendPhase2 (int port, int flag)
 
int ksceUsbdResume (int port)
 
int ksceUsbdHostStop (int port)
 
int ksceUsbdHostStart (int port)
 
int ksceUsbdGetDeviceSpeed (int device_id, uint8_t *speed)
 Get device speed.
 
int ksceUsbd_05073925 (SceUID device_id, int *unk1, int *unk2)
 
int ksceUsbd_7938DAC7 (SceUID pipe_id)
 

Variables

uint8_t SceUsbdDeviceDescriptor::bLength
 
uint8_t SceUsbdDeviceDescriptor::bDescriptorType
 
uint16_t SceUsbdDeviceDescriptor::bcdUSB
 
uint8_t SceUsbdDeviceDescriptor::bDeviceClass
 
uint8_t SceUsbdDeviceDescriptor::bDeviceSubclass
 
uint8_t SceUsbdDeviceDescriptor::bDeviceProtocol
 
uint8_t SceUsbdDeviceDescriptor::bMaxPacketSize0
 
uint16_t SceUsbdDeviceDescriptor::idVendor
 
uint16_t SceUsbdDeviceDescriptor::idProduct
 
uint16_t SceUsbdDeviceDescriptor::bcdDevice
 
uint8_t SceUsbdDeviceDescriptor::iManufacturer
 
uint8_t SceUsbdDeviceDescriptor::iProduct
 
uint8_t SceUsbdDeviceDescriptor::iSerialNumber
 
uint8_t SceUsbdDeviceDescriptor::bNumConfigurations
 
uint8_t SceUsbdConfigurationDescriptor::bLength
 
uint8_t SceUsbdConfigurationDescriptor::bDescriptorType
 
uint16_t SceUsbdConfigurationDescriptor::wTotalLength
 
uint8_t SceUsbdConfigurationDescriptor::bNumInterfaces
 
uint8_t SceUsbdConfigurationDescriptor::bConfigurationValue
 
uint8_t SceUsbdConfigurationDescriptor::iConfiguration
 
uint8_t SceUsbdConfigurationDescriptor::bmAttributes
 
uint8_t SceUsbdConfigurationDescriptor::MaxPower
 
uint8_t SceUsbdInterfaceDescriptor::bLength
 
uint8_t SceUsbdInterfaceDescriptor::bDescriptorType
 
uint8_t SceUsbdInterfaceDescriptor::bInterfaceNumber
 
uint8_t SceUsbdInterfaceDescriptor::bAlternateSetting
 
uint8_t SceUsbdInterfaceDescriptor::bNumEndpoints
 
uint8_t SceUsbdInterfaceDescriptor::bInterfaceClass
 
uint8_t SceUsbdInterfaceDescriptor::bInterfaceSubclass
 
uint8_t SceUsbdInterfaceDescriptor::bInterfaceProtocol
 
uint8_t SceUsbdInterfaceDescriptor::iInterface
 
uint8_t SceUsbdEndpointDescriptor::bLength
 
uint8_t SceUsbdEndpointDescriptor::bDescriptorType
 
uint8_t SceUsbdEndpointDescriptor::bEndpointAddress
 
uint8_t SceUsbdEndpointDescriptor::bmAttributes
 
uint16_t SceUsbdEndpointDescriptor::wMaxPacketSize
 
uint8_t SceUsbdEndpointDescriptor::bInterval
 
uint8_t SceUsbdStringDescriptor::bLength
 
uint8_t SceUsbdStringDescriptor::bDescriptorType
 
uint8_t SceUsbdStringDescriptor::bString [0]
 
uint8_t SceUsbdHidSubDescriptorInfo::bDescriptorType
 
uint8_t SceUsbdHidSubDescriptorInfo::wDescriptorLength0
 
uint8_t SceUsbdHidSubDescriptorInfo::wDescriptorLength1
 
uint8_t SceUsbdHidDescriptor::bLength
 
uint8_t SceUsbdHidDescriptor::bDescriptorType
 
uint8_t SceUsbdHidDescriptor::bcdHID0
 
uint8_t SceUsbdHidDescriptor::bcdHID1
 
uint8_t SceUsbdHidDescriptor::bCountryCode
 
uint8_t SceUsbdHidDescriptor::bNumDescriptors
 
SceUsbdHidSubDescriptorInfo SceUsbdHidDescriptor::SubDescriptorInfo [0]
 
unsigned int SceUsbdDeviceAddress::unk0
 
unsigned short SceUsbdDeviceAddress::unk1
 
unsigned int unk0
 
unsigned short unk1
 
const char * SceUsbdDriver::name
 
int(* SceUsbdDriver::probe )(int device_id)
 
int(* SceUsbdDriver::attach )(int device_id)
 
int(* SceUsbdDriver::detach )(int device_id)
 
const char * SceUsbdCompositeDriver::name
 
int(* SceUsbdCompositeDriver::probe )(int device_id, SceUsbdEndpointDescriptor *desc)
 
int(* SceUsbdCompositeDriver::attach )(int device_id)
 
int(* SceUsbdCompositeDriver::detach )(int device_id)
 
uint8_t SceUsbdDeviceRequest::bmRequestType
 
uint8_t SceUsbdDeviceRequest::bRequest
 
uint16_t SceUsbdDeviceRequest::wValue
 
uint16_t SceUsbdDeviceRequest::wIndex
 
uint16_t SceUsbdDeviceRequest::wLength
 
uint16_t ksceUsbdIsochPswLen::len:12
 
uint16_t ksceUsbdIsochPswLen::PSW:4
 
void * ksceUsbdIsochTransfer::buffer_base
 
int32_t ksceUsbdIsochTransfer::relative_start_frame
 
int32_t ksceUsbdIsochTransfer::num_packets
 
ksceUsbdIsochPswLen ksceUsbdIsochTransfer::packets [8]
 

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:

SceUsbdForDriver_stub




Data Structure Documentation

◆ SceUsbdDeviceDescriptor

struct SceUsbdDeviceDescriptor
Data Fields
uint8_t bLength
uint8_t bDescriptorType
uint16_t bcdUSB
uint8_t bDeviceClass
uint8_t bDeviceSubclass
uint8_t bDeviceProtocol
uint8_t bMaxPacketSize0
uint16_t idVendor
uint16_t idProduct
uint16_t bcdDevice
uint8_t iManufacturer
uint8_t iProduct
uint8_t iSerialNumber
uint8_t bNumConfigurations

◆ SceUsbdConfigurationDescriptor

struct SceUsbdConfigurationDescriptor
Data Fields
uint8_t bLength
uint8_t bDescriptorType
uint16_t wTotalLength
uint8_t bNumInterfaces
uint8_t bConfigurationValue
uint8_t iConfiguration
uint8_t bmAttributes
uint8_t MaxPower

◆ SceUsbdInterfaceDescriptor

struct SceUsbdInterfaceDescriptor
Data Fields
uint8_t bLength
uint8_t bDescriptorType
uint8_t bInterfaceNumber
uint8_t bAlternateSetting
uint8_t bNumEndpoints
uint8_t bInterfaceClass
uint8_t bInterfaceSubclass
uint8_t bInterfaceProtocol
uint8_t iInterface

◆ SceUsbdEndpointDescriptor

struct SceUsbdEndpointDescriptor
Data Fields
uint8_t bLength
uint8_t bDescriptorType
uint8_t bEndpointAddress
uint8_t bmAttributes
uint16_t wMaxPacketSize
uint8_t bInterval

◆ SceUsbdStringDescriptor

struct SceUsbdStringDescriptor
Data Fields
uint8_t bLength
uint8_t bDescriptorType
uint8_t bString[0]

◆ SceUsbdHidSubDescriptorInfo

struct SceUsbdHidSubDescriptorInfo
Data Fields
uint8_t bDescriptorType
uint8_t wDescriptorLength0
uint8_t wDescriptorLength1

◆ SceUsbdHidDescriptor

struct SceUsbdHidDescriptor
Data Fields
uint8_t bLength
uint8_t bDescriptorType
uint8_t bcdHID0
uint8_t bcdHID1
uint8_t bCountryCode
uint8_t bNumDescriptors
SceUsbdHidSubDescriptorInfo SubDescriptorInfo[0]

◆ SceUsbdDeviceAddress

struct SceUsbdDeviceAddress
Data Fields
unsigned int unk0
unsigned short unk1

◆ SceUsbdDriver

struct SceUsbdDriver

Data Fields

const char * name
 
int(* probe )(int device_id)
 
int(* attach )(int device_id)
 
int(* detach )(int device_id)
 

◆ SceUsbdCompositeDriver

struct SceUsbdCompositeDriver

Data Fields

const char * name
 
int(* probe )(int device_id, SceUsbdEndpointDescriptor *desc)
 
int(* attach )(int device_id)
 
int(* detach )(int device_id)
 

◆ SceUsbdDeviceRequest

struct SceUsbdDeviceRequest
Data Fields
uint8_t bmRequestType
uint8_t bRequest
uint16_t wValue
uint16_t wIndex
uint16_t wLength

◆ ksceUsbdIsochPswLen

struct ksceUsbdIsochPswLen
Data Fields
uint16_t len:12
uint16_t PSW:4

◆ ksceUsbdIsochTransfer

struct ksceUsbdIsochTransfer
Data Fields
void * buffer_base
int32_t relative_start_frame
int32_t num_packets
ksceUsbdIsochPswLen packets[8]

Macro Definition Documentation

◆ SCE_USBD_CLASS_PER_INTERFACE

#define SCE_USBD_CLASS_PER_INTERFACE   0x00

◆ SCE_USBD_CLASS_AUDIO

#define SCE_USBD_CLASS_AUDIO   0x01

◆ SCE_USBD_CLASS_COMMUNICATIONS

#define SCE_USBD_CLASS_COMMUNICATIONS   0x02

◆ SCE_USBD_CLASS_HID

#define SCE_USBD_CLASS_HID   0x03

◆ SCE_USBD_CLASS_MONITOR

#define SCE_USBD_CLASS_MONITOR   0x04

◆ SCE_USBD_CLASS_PHYSICAL

#define SCE_USBD_CLASS_PHYSICAL   0x05

◆ SCE_USBD_CLASS_POWER

#define SCE_USBD_CLASS_POWER   0x06

◆ SCE_USBD_CLASS_PRINTER

#define SCE_USBD_CLASS_PRINTER   0x07

◆ SCE_USBD_CLASS_STORAGE

#define SCE_USBD_CLASS_STORAGE   0x08

◆ SCE_USBD_CLASS_HUB

#define SCE_USBD_CLASS_HUB   0x09

◆ SCE_USBD_CLASS_DATA

#define SCE_USBD_CLASS_DATA   0x0a

◆ SCE_USBD_CLASS_VENDOR_SPECIFIC

#define SCE_USBD_CLASS_VENDOR_SPECIFIC   0xff

◆ SCE_USBD_CONFIGURATION_RESERVED_ZERO

#define SCE_USBD_CONFIGURATION_RESERVED_ZERO   0x1f

◆ SCE_USBD_CONFIGURATION_REMOTE_WAKEUP

#define SCE_USBD_CONFIGURATION_REMOTE_WAKEUP   0x20

◆ SCE_USBD_CONFIGURATION_SELF_POWERED

#define SCE_USBD_CONFIGURATION_SELF_POWERED   0x40

◆ SCE_USBD_CONFIGURATION_RESERVED_ONE

#define SCE_USBD_CONFIGURATION_RESERVED_ONE   0x80

◆ SCE_USBD_ENDPOINT_TRANSFER_TYPE_BITS

#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_BITS   0x03

◆ SCE_USBD_ENDPOINT_TRANSFER_TYPE_SHIFT

#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_SHIFT   0

◆ SCE_USBD_ENDPOINT_TRANSFER_TYPE_CONTROL

#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_CONTROL   0x00

◆ SCE_USBD_ENDPOINT_TRANSFER_TYPE_ISOCHRONOUS

#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_ISOCHRONOUS   0x01

◆ SCE_USBD_ENDPOINT_TRANSFER_TYPE_BULK

#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_BULK   0x02

◆ SCE_USBD_ENDPOINT_TRANSFER_TYPE_INTERRUPT

#define SCE_USBD_ENDPOINT_TRANSFER_TYPE_INTERRUPT   0x03

◆ SCE_USBD_ENDPOINT_NUMBER_BITS

#define SCE_USBD_ENDPOINT_NUMBER_BITS   0x1f

◆ SCE_USBD_ENDPOINT_NUMBER_SHIFT

#define SCE_USBD_ENDPOINT_NUMBER_SHIFT   0

◆ SCE_USBD_ENDPOINT_DIRECTION_BITS

#define SCE_USBD_ENDPOINT_DIRECTION_BITS   0x80

◆ SCE_USBD_ENDPOINT_DIRECTION_SHIFT

#define SCE_USBD_ENDPOINT_DIRECTION_SHIFT   7

◆ SCE_USBD_ENDPOINT_DIRECTION_OUT

#define SCE_USBD_ENDPOINT_DIRECTION_OUT   0x00

◆ SCE_USBD_ENDPOINT_DIRECTION_IN

#define SCE_USBD_ENDPOINT_DIRECTION_IN   0x80

◆ SCE_USBD_PROBE_SUCCEEDED

#define SCE_USBD_PROBE_SUCCEEDED   (0)

◆ SCE_USBD_PROBE_FAILED

#define SCE_USBD_PROBE_FAILED   (-1)

◆ SCE_USBD_ATTACH_SUCCEEDED

#define SCE_USBD_ATTACH_SUCCEEDED   (0)

◆ SCE_USBD_ATTACH_FAILED

#define SCE_USBD_ATTACH_FAILED   (-1)

◆ SCE_USBD_DETACH_SUCCEEDED

#define SCE_USBD_DETACH_SUCCEEDED   (0)

◆ SCE_USBD_DETACH_FAILED

#define SCE_USBD_DETACH_FAILED   (-1)

◆ SCE_USBD_MAX_LS_CONTROL_PACKET_SIZE

#define SCE_USBD_MAX_LS_CONTROL_PACKET_SIZE   8

◆ SCE_USBD_MAX_FS_CONTROL_PACKET_SIZE

#define SCE_USBD_MAX_FS_CONTROL_PACKET_SIZE   64

◆ SCE_USBD_MAX_ISOCHRONOUS_PACKET_SIZE

#define SCE_USBD_MAX_ISOCHRONOUS_PACKET_SIZE   1023

◆ SCE_USBD_MAX_LS_INTERRUPT_PACKET_SIZE

#define SCE_USBD_MAX_LS_INTERRUPT_PACKET_SIZE   8

◆ SCE_USBD_MAX_FS_INTERRUPT_PACKET_SIZE

#define SCE_USBD_MAX_FS_INTERRUPT_PACKET_SIZE   64

◆ SCE_USBD_MAX_BULK_PACKET_SIZE

#define SCE_USBD_MAX_BULK_PACKET_SIZE   64

◆ SCE_USBD_FEATURE_ENDPOINT_HALT

#define SCE_USBD_FEATURE_ENDPOINT_HALT   0x00

◆ SCE_USBD_FEATURE_DEVICE_REMOTE_WAKEUP

#define SCE_USBD_FEATURE_DEVICE_REMOTE_WAKEUP   0x01

◆ SCE_USBD_DEVICE_SPEED_LS

#define SCE_USBD_DEVICE_SPEED_LS   (0)

◆ SCE_USBD_DEVICE_SPEED_FS

#define SCE_USBD_DEVICE_SPEED_FS   (1)

◆ SCE_USBD_DEVICE_SPEED_HS

#define SCE_USBD_DEVICE_SPEED_HS   (2)

◆ ksceUsbdSetConfiguration [1/2]

#define ksceUsbdSetConfiguration (   pid,
  config,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x00; \
_dr.wValue = (config); \
_dr.wIndex = 0; \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })
SceUID pid
Definition debug.h:1
uint8_t bRequest
Definition usbd.h:54
uint16_t wValue
Definition usbd.h:55
uint16_t wIndex
Definition usbd.h:56
uint16_t wLength
Definition usbd.h:57
uint8_t bmRequestType
Definition usbd.h:53
@ SCE_USBD_REQUEST_SET_CONFIGURATION
Definition usbd.h:85
Definition usbd.h:52

◆ ksceUsbdSetConfiguration [2/2]

#define ksceUsbdSetConfiguration (   pid,
  config,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x00; \
_dr.wValue = (config); \
_dr.wIndex = 0; \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })

◆ ksceUsbdClearDeviceFeature

#define ksceUsbdClearDeviceFeature (   pid,
  fs,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x00; \
_dr.wValue = (fs); \
_dr.wIndex = 0; \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })
@ SCE_USBD_REQUEST_CLEAR_FEATURE
Definition usbd.h:79

◆ ksceUsbdClearInterfaceFeature

#define ksceUsbdClearInterfaceFeature (   pid,
  fs,
  interface,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x01; \
_dr.wValue = (fs); \
_dr.wIndex = (interface); \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })

◆ ksceUsbdClearEndpointFeature

#define ksceUsbdClearEndpointFeature (   pid,
  fs,
  endpoint,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x02; \
_dr.wValue = (fs); \
_dr.wIndex = (endpoint); \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })

◆ ksceUsbdGetConfiguration

#define ksceUsbdGetConfiguration (   pid,
  ptr,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x80; \
_dr.wValue = 0; \
_dr.wIndex = 0; \
_dr.wLength = 1; \
ksceUsbdControlTransfer((pid), (&_dr), (ptr), (cb), (arg)); })
@ SCE_USBD_REQUEST_GET_CONFIGURATION
Definition usbd.h:84

◆ ksceUsbdGetDescriptor

#define ksceUsbdGetDescriptor (   pid,
  type,
  index,
  lang_id,
  ptr,
  len,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x80; \
_dr.wValue = ((type) << 8) | (index); \
_dr.wIndex = (lang_id); \
_dr.wLength = (len); \
ksceUsbdControlTransfer((pid), (&_dr), (ptr), (cb), (arg)); })
uint8_t type
0 = read?, 1 = write?, 2 = feature?, 3 = ?
Definition bt.h:2
@ SCE_USBD_REQUEST_GET_DESCRIPTOR
Definition usbd.h:82

◆ ksceUsbdGetInterface

#define ksceUsbdGetInterface (   pid,
  interface,
  ptr,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x81; \
_dr.wValue = 0; \
_dr.wIndex = (interface); \
_dr.wLength = 1; \
ksceUsbdControlTransfer((pid), (&_dr), (ptr), (cb), (arg)); })
@ SCE_USBD_REQUEST_GET_INTERFACE
Definition usbd.h:86

◆ ksceUsbdGetDeviceStatus

#define ksceUsbdGetDeviceStatus (   pid,
  ptr,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x80; \
_dr.wValue = 0; \
_dr.wIndex = 0; \
_dr.wLength = 2; \
ksceUsbdControlTransfer((pid), (&_dr), (ptr), (cb), (arg)); })
@ SCE_USBD_REQUEST_GET_STATUS
Definition usbd.h:78

◆ ksceUsbdGetInterfaceStatus

#define ksceUsbdGetInterfaceStatus (   pid,
  interface,
  ptr,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x81; \
_dr.wValue = 0; \
_dr.wIndex = (interface); \
_dr.wLength = 2; \
ksceUsbdControlTransfer((pid), (&_dr), (ptr), (cb), (arg)); })

◆ ksceUsbdGetEndpointStatus

#define ksceUsbdGetEndpointStatus (   pid,
  endpoint,
  ptr,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x82; \
_dr.wValue = 0; \
_dr.wIndex = (endpoint); \
_dr.wLength = 2; \
ksceUsbdControlTransfer((pid), (&_dr), (ptr), (cb), (arg)); })

◆ ksceUsbdSetAddress

#define ksceUsbdSetAddress (   pid,
  address,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x00; \
_dr.wValue = (address); \
_dr.wIndex = 0; \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })
@ SCE_USBD_REQUEST_SET_ADDRESS
Definition usbd.h:81

◆ ksceUsbdSetDeviceDescriptor

#define ksceUsbdSetDeviceDescriptor (   pid,
  type,
  index,
  lang_id,
  ptr,
  len,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x00; \
_dr.wValue = ((type) << 8) | (index); \
_dr.wIndex = (lang_id); \
_dr.wLength = (len); \
ksceUsbdControlTransfer((pid), (&_dr), (ptr), (cb), (arg)); })
@ SCE_USBD_REQUEST_SET_DESCRIPTOR
Definition usbd.h:83

◆ ksceUsbdSetInterfaceDescriptor

#define ksceUsbdSetInterfaceDescriptor (   pid,
  type,
  index,
  lang_id,
  ptr,
  len,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x01; \
_dr.wValue = ((type) << 8) | (index); \
_dr.wIndex = (lang_id); \
_dr.wLength = (len); \
ksceUsbdControlTransfer((pid), (&_dr), (ptr), (cb), (arg)); })

◆ ksceUsbdSetEndpointDescriptor

#define ksceUsbdSetEndpointDescriptor (   pid,
  type,
  index,
  lang_id,
  ptr,
  len,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x02; \
_dr.wValue = ((type) << 8) | (index); \
_dr.wIndex = (lang_id); \
_dr.wLength = (len); \
ksceUsbdControlTransfer((pid), (&_dr), (ptr), (cb), (arg)); })

◆ ksceUsbdSetDeviceFeature

#define ksceUsbdSetDeviceFeature (   pid,
  fs,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x00; \
_dr.wValue = (fs); \
_dr.wIndex = 0; \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })
@ SCE_USBD_REQUEST_SET_FEATURE
Definition usbd.h:80

◆ ksceUsbdSetInterfaceFeature

#define ksceUsbdSetInterfaceFeature (   pid,
  fs,
  interface,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x01; \
_dr.wValue = (fs); \
_dr.wIndex = (interface); \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })

◆ ksceUsbdSetEndpointFeature

#define ksceUsbdSetEndpointFeature (   pid,
  fs,
  endpoint,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x02; \
_dr.wValue = (fs); \
_dr.wIndex = (endpoint); \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })

◆ ksceUsbdSetInterface

#define ksceUsbdSetInterface (   pid,
  interface,
  alt_setting,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x01; \
_dr.wValue = (alt_setting); \
_dr.wIndex = (interface); \
_dr.wLength = 0; \
ksceUsbdControlTransfer((pid), (&_dr), NULL, (cb), (arg)); })
@ SCE_USBD_REQUEST_SET_INTERFACE
Definition usbd.h:87

◆ ksceUsbdSynchFrame

#define ksceUsbdSynchFrame (   pid,
  endpoint,
  pfn,
  cb,
  arg 
)
Value:
({ \
_dr.bmRequestType = 0x82; \
_dr.wValue = 0; \
_dr.wIndex = (endpoint); \
_dr.wLength = 2; \
ksceUsbdControlTransfer((pid), (&_dr), pfn, (cb), (arg)); })
@ SCE_USBD_REQUEST_SYNCH_FRAME
Definition usbd.h:88

◆ OHCI_CC_NO_ERROR

#define OHCI_CC_NO_ERROR   0x0

◆ OHCI_CC_CRC

#define OHCI_CC_CRC   0x1

◆ OHCI_CC_BIT_STUFFING

#define OHCI_CC_BIT_STUFFING   0x2

◆ OHCI_CC_DATA_TOGGLE_MISMATCH

#define OHCI_CC_DATA_TOGGLE_MISMATCH   0x3

◆ OHCI_CC_STALL

#define OHCI_CC_STALL   0x4

◆ OHCI_CC_DEVICE_NOT_RESPONDING

#define OHCI_CC_DEVICE_NOT_RESPONDING   0x5

◆ OHCI_CC_PID_CHECK_FAILURE

#define OHCI_CC_PID_CHECK_FAILURE   0x6

◆ OHCI_CC_UNEXPECTED_PID

#define OHCI_CC_UNEXPECTED_PID   0x7

◆ OHCI_CC_DATA_OVERRUN

#define OHCI_CC_DATA_OVERRUN   0x8

◆ OHCI_CC_DATA_UNDERRUN

#define OHCI_CC_DATA_UNDERRUN   0x9

◆ OHCI_CC_BUFFER_OVERRUN

#define OHCI_CC_BUFFER_OVERRUN   0xc

◆ OHCI_CC_BUFFER_UNDERRUN

#define OHCI_CC_BUFFER_UNDERRUN   0xd

◆ OHCI_CC_NOT_ACCESSED1

#define OHCI_CC_NOT_ACCESSED1   0xe

◆ OHCI_CC_NOT_ACCESSED2

#define OHCI_CC_NOT_ACCESSED2   0xf

◆ EHCI_CC_MISSED_MICRO_FRAME

#define EHCI_CC_MISSED_MICRO_FRAME   0x10

◆ EHCI_CC_XACT

#define EHCI_CC_XACT   0x20

◆ EHCI_CC_BABBLE

#define EHCI_CC_BABBLE   0x30

◆ EHCI_CC_DATABUF

#define EHCI_CC_DATABUF   0x40

◆ EHCI_CC_HALTED

#define EHCI_CC_HALTED   0x50

◆ USBD_CC_NOERR

#define USBD_CC_NOERR   0x0

◆ USBD_CC_MISSED_MICRO_FRAME

#define USBD_CC_MISSED_MICRO_FRAME   0x1

◆ USBD_CC_XACTERR

#define USBD_CC_XACTERR   0x2

◆ USBD_CC_BABBLE

#define USBD_CC_BABBLE   0x4

◆ USBD_CC_DATABUF

#define USBD_CC_DATABUF   0x8

Typedef Documentation

◆ ksceUsbdDoneCallback

typedef void(* ksceUsbdDoneCallback) (int32_t result, int32_t count, void *arg)

◆ ksceUsbdIsochDoneCallback

typedef void(* ksceUsbdIsochDoneCallback) (int32_t result, ksceUsbdIsochTransfer *req, void *arg)

Enumeration Type Documentation

◆ SceUsbdErrorCode

Enumerator
SCE_USBD_ERROR_NOT_INITIALIZED 
SCE_USBD_ERROR_ALREADY_INITIALIZED 
SCE_USBD_ERROR_INVALID_PARAM 
SCE_USBD_ERROR_PIPE_NOT_FOUND 
SCE_USBD_ERROR_NO_MEMORY 
SCE_USBD_ERROR_DEVICE_NOT_FOUND 
SCE_USBD_ERROR_80240007 
SCE_USBD_ERROR_80240009 
SCE_USBD_ERROR_8024000A 
SCE_USBD_ERROR_FATAL 

◆ SceUsbdDescriptorType

Enumerator
SCE_USBD_DESCRIPTOR_DEVICE 
SCE_USBD_DESCRIPTOR_CONFIGURATION 
SCE_USBD_DESCRIPTOR_STRING 
SCE_USBD_DESCRIPTOR_INTERFACE 
SCE_USBD_DESCRIPTOR_ENDPOINT 
SCE_USBD_DESCRIPTOR_DEVICE_QUALIFIER 
SCE_USBD_DESCRIPTOR_OTHER_SPEED 
SCE_USBD_DESCRIPTOR_INTERFACE_POWER 
SCE_USBD_DESCRIPTOR_OTG 
SCE_USBD_DESCRIPTOR_HID 
SCE_USBD_DESCRIPTOR_REPORT 

◆ SceUsbdReqtype

Enumerator
SCE_USBD_REQTYPE_DIR_BITS 
SCE_USBD_REQTYPE_DIR_TO_DEVICE 
SCE_USBD_REQTYPE_DIR_TO_HOST 
SCE_USBD_REQTYPE_TYPE_BITS 
SCE_USBD_REQTYPE_TYPE_STANDARD 
SCE_USBD_REQTYPE_TYPE_CLASS 
SCE_USBD_REQTYPE_TYPE_VENDOR 
SCE_USBD_REQTYPE_TYPE_RESERVED 
SCE_USBD_REQTYPE_RECIP_BITS 
SCE_USBD_REQTYPE_RECIP_DEVICE 
SCE_USBD_REQTYPE_RECIP_INTERFACE 
SCE_USBD_REQTYPE_RECIP_ENDPOINT 
SCE_USBD_REQTYPE_RECIP_OTHER 

◆ SceUsbdRequest

Enumerator
SCE_USBD_REQUEST_GET_STATUS 
SCE_USBD_REQUEST_CLEAR_FEATURE 
SCE_USBD_REQUEST_SET_FEATURE 
SCE_USBD_REQUEST_SET_ADDRESS 
SCE_USBD_REQUEST_GET_DESCRIPTOR 
SCE_USBD_REQUEST_SET_DESCRIPTOR 
SCE_USBD_REQUEST_GET_CONFIGURATION 
SCE_USBD_REQUEST_SET_CONFIGURATION 
SCE_USBD_REQUEST_GET_INTERFACE 
SCE_USBD_REQUEST_SET_INTERFACE 
SCE_USBD_REQUEST_SYNCH_FRAME 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/13]

VITASDK_BUILD_ASSERT_EQ ( 0x12  ,
SceUsbdDeviceDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/13]

VITASDK_BUILD_ASSERT_EQ ( 0xA  ,
SceUsbdConfigurationDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/13]

VITASDK_BUILD_ASSERT_EQ ( ,
SceUsbdInterfaceDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/13]

VITASDK_BUILD_ASSERT_EQ ( ,
SceUsbdEndpointDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/13]

VITASDK_BUILD_ASSERT_EQ ( ,
SceUsbdStringDescriptor   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/13]

VITASDK_BUILD_ASSERT_EQ ( ,
SceUsbdHidSubDescriptorInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [7/13]

VITASDK_BUILD_ASSERT_EQ ( ,
SceUsbdHidDescriptor   
)

◆ __attribute__()

struct SceUsbdDeviceAddress __attribute__ ( (packed)  )

◆ VITASDK_BUILD_ASSERT_EQ() [8/13]

VITASDK_BUILD_ASSERT_EQ ( ,
SceUsbdDeviceAddress   
)

◆ VITASDK_BUILD_ASSERT_EQ() [9/13]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceUsbdDriver   
)

◆ VITASDK_BUILD_ASSERT_EQ() [10/13]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceUsbdCompositeDriver   
)

◆ VITASDK_BUILD_ASSERT_EQ() [11/13]

VITASDK_BUILD_ASSERT_EQ ( ,
SceUsbdDeviceRequest   
)

◆ VITASDK_BUILD_ASSERT_EQ() [12/13]

VITASDK_BUILD_ASSERT_EQ ( ,
ksceUsbdIsochPswLen   
)

◆ VITASDK_BUILD_ASSERT_EQ() [13/13]

VITASDK_BUILD_ASSERT_EQ ( 0x1C  ,
ksceUsbdIsochTransfer   
)

◆ ksceUsbdRegisterDriver()

int ksceUsbdRegisterDriver ( const SceUsbdDriver driver)

Register USB driver.

Returns
0 on success, < 0 on error
Parameters
driverdriver struct

◆ ksceUsbdRegisterCompositeLdd()

int ksceUsbdRegisterCompositeLdd ( const SceUsbdCompositeDriver driver)

Register USB driver for composite devices.

Returns
0 on success, < 0 on error
Parameters
driverdriver struct

◆ ksceUsbdUnregisterDriver()

int ksceUsbdUnregisterDriver ( const SceUsbdDriver driver)

De-register USB driver.

Returns
0 on success, < 0 on error
Parameters
driverdriver struct

◆ ksceUsbdUnregisterCompositeLdd()

int ksceUsbdUnregisterCompositeLdd ( const SceUsbdCompositeDriver driver)

De-register USB driver for composite devices.

Returns
0 on success, < 0 on error
Parameters
driverdriver struct

◆ ksceUsbdScanStaticDescriptor()

void * ksceUsbdScanStaticDescriptor ( SceUID  device_id,
void *  start,
SceUsbdDescriptorType  type 
)

Return usb descriptor.

Returns
descriptor data on success, NULL on error
Parameters
device_iddevice id
startpointer to descriptor to start scanning from (may be NULL)
typedescriptor type

◆ ksceUsbdOpenPipe()

SceUID ksceUsbdOpenPipe ( int  device_id,
SceUsbdEndpointDescriptor endpoint 
)

Open communication pipe to endpoint.

Returns
pipe uid on success, < 0 on error
Parameters
device_iddevice id
endpointendpoint (may be null for default configuration endpoint)

◆ ksceUsbdClosePipe()

int ksceUsbdClosePipe ( SceUID  pipe_id)

Close communication pipe to endpoint.

Returns
0 on success, < 0 on error
Parameters
pipe_idpipe id

◆ ksceUsbdControlTransfer()

int ksceUsbdControlTransfer ( SceUID  pipe_id,
const SceUsbdDeviceRequest req,
unsigned char *  buffer,
ksceUsbdDoneCallback  cb,
void *  user_data 
)

Transfer data to/from endpoint.

Returns
0 on success, < 0 on error
Parameters
pipe_idpipe id
reqtransfer request
bufferdata
cbtransfer callback
user_datauserdata to pass to callback

◆ ksceUsbdInterruptTransfer()

int ksceUsbdInterruptTransfer ( SceUID  pipe_id,
unsigned char *  buffer,
SceSize  length,
ksceUsbdDoneCallback  cb,
void *  user_data 
)

Transfer data to/from interrupt endpoint.

Returns
0 on success, < 0 on error
Parameters
pipe_idpipe id
bufferdata
lengthdata length
cbtransfer callback
user_datauserdata to pass to callback

◆ ksceUsbdIsochronousTransfer()

int ksceUsbdIsochronousTransfer ( SceUID  pipe_id,
ksceUsbdIsochTransfer transfer,
ksceUsbdIsochDoneCallback  cb,
void *  user_data 
)

Transfer isochronous data to/from endpoint.

Returns
0 on success, < 0 on error
Parameters
pipe_idpipe id
transfertransfer request
cbtransfer callback
user_datauserdata to pass to callback

◆ ksceUsbdBulkTransfer()

int ksceUsbdBulkTransfer ( SceUID  pipe_id,
unsigned char *  buffer,
unsigned int  length,
ksceUsbdDoneCallback  cb,
void *  user_data 
)

Transfer data to/from endpoint.

Returns
0 on success, < 0 on error
Parameters
pipe_idpipe id
bufferdata
lengthdata length
cbtransfer callback
user_datauserdata to pass to callback
Note
buffer pointer must be 64b aligned

◆ ksceUsbdBulkTransfer2()

int ksceUsbdBulkTransfer2 ( int  pipe_id,
unsigned char *  buffer,
unsigned int  length,
ksceUsbdDoneCallback  cb,
void *  user_data 
)

Transfer data to/from endpoint.

Returns
0 on success, < 0 on error
Parameters
pipe_idpipe id
bufferdata
lengthdata length
cbtransfer callback
user_datauserdata to pass to callback
Note
buffer pointer must be 64b aligned

◆ ksceUsbdGetDeviceLocation()

int ksceUsbdGetDeviceLocation ( SceUID  device_id,
uint8_t *  location 
)

Get device location.

Returns
0 on success, < 0 on error
Parameters
device_iddevice id
[out]locationdevice location data (port)

◆ ksceUsbdSuspend()

int ksceUsbdSuspend ( int  port)

◆ ksceUsbdSuspendPhase2()

int ksceUsbdSuspendPhase2 ( int  port,
int  flag 
)

◆ ksceUsbdResume()

int ksceUsbdResume ( int  port)

◆ ksceUsbdHostStop()

int ksceUsbdHostStop ( int  port)

◆ ksceUsbdHostStart()

int ksceUsbdHostStart ( int  port)

◆ ksceUsbdGetDeviceSpeed()

int ksceUsbdGetDeviceSpeed ( int  device_id,
uint8_t *  speed 
)

Get device speed.

Returns
0 on success, < 0 on error
Parameters
device_iddevice id
[out]speeddevice speed

◆ ksceUsbd_05073925()

int ksceUsbd_05073925 ( SceUID  device_id,
int *  unk1,
int *  unk2 
)

◆ ksceUsbd_7938DAC7()

int ksceUsbd_7938DAC7 ( SceUID  pipe_id)

Variable Documentation

◆ bLength [1/6]

uint8_t SceUsbdDeviceDescriptor::bLength

◆ bDescriptorType [1/7]

uint8_t SceUsbdDeviceDescriptor::bDescriptorType

◆ bcdUSB

uint16_t SceUsbdDeviceDescriptor::bcdUSB

◆ bDeviceClass

uint8_t SceUsbdDeviceDescriptor::bDeviceClass

◆ bDeviceSubclass

uint8_t SceUsbdDeviceDescriptor::bDeviceSubclass

◆ bDeviceProtocol

uint8_t SceUsbdDeviceDescriptor::bDeviceProtocol

◆ bMaxPacketSize0

uint8_t SceUsbdDeviceDescriptor::bMaxPacketSize0

◆ idVendor

uint16_t SceUsbdDeviceDescriptor::idVendor

◆ idProduct

uint16_t SceUsbdDeviceDescriptor::idProduct

◆ bcdDevice

uint16_t SceUsbdDeviceDescriptor::bcdDevice

◆ iManufacturer

uint8_t SceUsbdDeviceDescriptor::iManufacturer

◆ iProduct

uint8_t SceUsbdDeviceDescriptor::iProduct

◆ iSerialNumber

uint8_t SceUsbdDeviceDescriptor::iSerialNumber

◆ bNumConfigurations

uint8_t SceUsbdDeviceDescriptor::bNumConfigurations

◆ bLength [2/6]

uint8_t SceUsbdConfigurationDescriptor::bLength

◆ bDescriptorType [2/7]

uint8_t SceUsbdConfigurationDescriptor::bDescriptorType

◆ wTotalLength

uint16_t SceUsbdConfigurationDescriptor::wTotalLength

◆ bNumInterfaces

uint8_t SceUsbdConfigurationDescriptor::bNumInterfaces

◆ bConfigurationValue

uint8_t SceUsbdConfigurationDescriptor::bConfigurationValue

◆ iConfiguration

uint8_t SceUsbdConfigurationDescriptor::iConfiguration

◆ bmAttributes [1/2]

uint8_t SceUsbdConfigurationDescriptor::bmAttributes

◆ MaxPower

uint8_t SceUsbdConfigurationDescriptor::MaxPower

◆ bLength [3/6]

uint8_t SceUsbdInterfaceDescriptor::bLength

◆ bDescriptorType [3/7]

uint8_t SceUsbdInterfaceDescriptor::bDescriptorType

◆ bInterfaceNumber

uint8_t SceUsbdInterfaceDescriptor::bInterfaceNumber

◆ bAlternateSetting

uint8_t SceUsbdInterfaceDescriptor::bAlternateSetting

◆ bNumEndpoints

uint8_t SceUsbdInterfaceDescriptor::bNumEndpoints

◆ bInterfaceClass

uint8_t SceUsbdInterfaceDescriptor::bInterfaceClass

◆ bInterfaceSubclass

uint8_t SceUsbdInterfaceDescriptor::bInterfaceSubclass

◆ bInterfaceProtocol

uint8_t SceUsbdInterfaceDescriptor::bInterfaceProtocol

◆ iInterface

uint8_t SceUsbdInterfaceDescriptor::iInterface

◆ bLength [4/6]

uint8_t SceUsbdEndpointDescriptor::bLength

◆ bDescriptorType [4/7]

uint8_t SceUsbdEndpointDescriptor::bDescriptorType

◆ bEndpointAddress

uint8_t SceUsbdEndpointDescriptor::bEndpointAddress

◆ bmAttributes [2/2]

uint8_t SceUsbdEndpointDescriptor::bmAttributes

◆ wMaxPacketSize

uint16_t SceUsbdEndpointDescriptor::wMaxPacketSize

◆ bInterval

uint8_t SceUsbdEndpointDescriptor::bInterval

◆ bLength [5/6]

uint8_t SceUsbdStringDescriptor::bLength

◆ bDescriptorType [5/7]

uint8_t SceUsbdStringDescriptor::bDescriptorType

◆ bString

uint8_t SceUsbdStringDescriptor::bString[0]

◆ bDescriptorType [6/7]

uint8_t SceUsbdHidSubDescriptorInfo::bDescriptorType

◆ wDescriptorLength0

uint8_t SceUsbdHidSubDescriptorInfo::wDescriptorLength0

◆ wDescriptorLength1

uint8_t SceUsbdHidSubDescriptorInfo::wDescriptorLength1

◆ bLength [6/6]

uint8_t SceUsbdHidDescriptor::bLength

◆ bDescriptorType [7/7]

uint8_t SceUsbdHidDescriptor::bDescriptorType

◆ bcdHID0

uint8_t SceUsbdHidDescriptor::bcdHID0

◆ bcdHID1

uint8_t SceUsbdHidDescriptor::bcdHID1

◆ bCountryCode

uint8_t SceUsbdHidDescriptor::bCountryCode

◆ bNumDescriptors

uint8_t SceUsbdHidDescriptor::bNumDescriptors

◆ SubDescriptorInfo

SceUsbdHidSubDescriptorInfo SceUsbdHidDescriptor::SubDescriptorInfo[0]

◆ unk0 [1/2]

unsigned int SceUsbdDeviceAddress::unk0

◆ unk1 [1/2]

unsigned short SceUsbdDeviceAddress::unk1

◆ unk0 [2/2]

unsigned int unk0

◆ unk1 [2/2]

unsigned short unk1

◆ name [1/2]

const char* SceUsbdDriver::name

◆ probe [1/2]

int(* SceUsbdDriver::probe) (int device_id)

◆ attach [1/2]

int(* SceUsbdDriver::attach) (int device_id)

◆ detach [1/2]

int(* SceUsbdDriver::detach) (int device_id)

◆ name [2/2]

const char* SceUsbdCompositeDriver::name

◆ probe [2/2]

int(* SceUsbdCompositeDriver::probe) (int device_id, SceUsbdEndpointDescriptor *desc)

◆ attach [2/2]

int(* SceUsbdCompositeDriver::attach) (int device_id)

◆ detach [2/2]

int(* SceUsbdCompositeDriver::detach) (int device_id)

◆ bmRequestType

uint8_t SceUsbdDeviceRequest::bmRequestType

◆ bRequest

uint8_t SceUsbdDeviceRequest::bRequest

◆ wValue

uint16_t SceUsbdDeviceRequest::wValue

◆ wIndex

uint16_t SceUsbdDeviceRequest::wIndex

◆ wLength

uint16_t SceUsbdDeviceRequest::wLength

◆ len

uint16_t ksceUsbdIsochPswLen::len

◆ PSW

uint16_t ksceUsbdIsochPswLen::PSW

◆ buffer_base

void* ksceUsbdIsochTransfer::buffer_base

◆ relative_start_frame

int32_t ksceUsbdIsochTransfer::relative_start_frame

◆ num_packets

int32_t ksceUsbdIsochTransfer::num_packets

◆ packets

ksceUsbdIsochPswLen ksceUsbdIsochTransfer::packets[8]