vitasdk
Documentation of the vitasdk
usbd.h File Reference
#include <vitasdk/build_utils.h>
#include <psp2/types.h>
#include <psp2common/usbd.h>

Go to the source code of this file.

Data Structures

struct  SceUsbdDeviceInfo
 
struct  SceUsbdTransferData
 
struct  SceUsbdReceiveEvent
 
struct  SceUsbdTransferStatus
 
struct  SceUsbdIsochTransferStatus
 
struct  SceUsbdDevicePipe
 
struct  SceUsbdIsochTransfer
 
struct  SceUsbdAttachCompositeParam
 

Macros

#define USB_DESCRIPTOR_DEVICE   0x01
 
#define USB_DESCRIPTOR_CONFIGURATION   0x02
 
#define USB_DESCRIPTOR_STRING   0x03
 
#define USB_DESCRIPTOR_INTERFACE   0x04
 
#define USB_DESCRIPTOR_ENDPOINT   0x05
 
#define USB_DESCRIPTOR_DEVICE_QUALIFIER   0x06
 
#define USB_DESCRIPTOR_OTHER_SPEED   0x07
 
#define USB_DESCRIPTOR_INTERFACE_POWER   0x08
 
#define USB_DESCRIPTOR_OTG   0x09
 
#define SCE_USBD_DEVICE_SPEED_LS   (0)
 
#define SCE_USBD_DEVICE_SPEED_FS   (1)
 
#define SCE_USBD_DEVICE_SPEED_HS   (2)
 

Functions

 VITASDK_BUILD_ASSERT_EQ (0xC, SceUsbdDeviceInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x14, SceUsbdTransferData)
 
 VITASDK_BUILD_ASSERT_EQ (0x1C, SceUsbdReceiveEvent)
 
int sceUsbdInit (SceUID *uid)
 Init usb subsystem. More...
 
int sceUsbdEnd (SceUID uid)
 Stop usb subsystem. More...
 
int sceUsbdGetDeviceList (SceUID uid, SceSize num, SceUsbdDeviceInfo *info)
 Get usb devices list. More...
 
int sceUsbdGetDescriptorSize (SceUID uid, unsigned int device_id)
 Get usb device descriptors data size. More...
 
int sceUsbdGetDescriptor (SceUID uid, SceUID device_id, unsigned char *descriptor, SceSize size)
 Get usb device descriptors (all) More...
 
int sceUsbdGetDeviceSpeed (SceUID uid, SceUID device_id, unsigned int *speed)
 Get usb device speed. More...
 
int sceUsbdRegisterCallback (SceUID cbid, int flag)
 Register callback to usb event. More...
 
int sceUsbdUnregisterCallback (SceUID cbid)
 Remove callback to usb event. More...
 
int sceUsbdResetDevice (SceUID uid, SceUID device_id)
 Reset usb device. More...
 
int sceUsbdAttach (SceUID uid, SceUID driver_id, SceUInt bus, SceUInt device)
 Attach specified driver to device. More...
 
int sceUsbdGetDeviceAddress (SceUID uid, SceUID device_id, SceUsbdDeviceAddress *addr)
 Get device address. More...
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceUsbdTransferStatus)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceUsbdIsochTransferStatus)
 
int sceUsbdGetTransferStatus (SceUID transfer_id, SceUsbdTransferStatus *status)
 Get transfer status. More...
 
int sceUsbdGetIsochTransferStatus (SceUID transfer_id, SceUsbdIsochTransferStatus *status)
 Get isochronous transfer status. More...
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceUsbdDevicePipe)
 
SceUID sceUsbdOpenPipe (SceUID uid, SceUsbdDevicePipe *pipe)
 Open endpoint communication pipe. More...
 
SceUID sceUsbdOpenDefaultPipe (SceUID uid, SceUID device_id)
 Open endpoint communication pipe for default config endpoint. More...
 
int sceUsbdClosePipe (SceUID uid, SceUID pipe_id)
 Close endpoint communication pipe. More...
 
SceUID sceUsbdTransferData (SceUID uid, SceUsbdTransferData *data)
 Transfer data to/from endpoint. More...
 
 VITASDK_BUILD_ASSERT_EQ (0x28, SceUsbdIsochTransfer)
 
int sceUsbdIsochTransferData (SceUID uid, SceUID pipe_id, SceUsbdIsochTransfer *transfer)
 Transfer data to/from endpoint isochronously. More...
 
int sceUsbdReceiveEvent (SceUID uid, SceUsbdReceiveEvent *event)
 Receive usb event. More...
 
SceUID sceUsbdRegisterLdd (SceUID uid, char *name)
 Register logical device driver. More...
 
SceUID sceUsbdRegisterCompositeLdd (SceUID uid, char *name)
 Register logical device driver for composite devices. More...
 
int sceUsbdUnregisterLdd (SceUID uid, char *name)
 De-register logical device driver. More...
 
 VITASDK_BUILD_ASSERT_EQ (0x14, SceUsbdAttachCompositeParam)
 
int sceUsbdAttachCompositeLdd (SceUID uid, SceUsbdAttachCompositeParam *param)
 Attach composite driver to device. More...