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