PSPSDK 2026-11-05
Unofficial static mirror · snapshot 2026-11-05 · upstream documentation
Loading...
Searching...
No Matches
pspusbacc_kernel.h File Reference
#include <psptypes.h>
#include <pspusbbus.h>
#include <pspusbacc.h>
Include dependency graph for pspusbacc_kernel.h:

Go to the source code of this file.

Data Structures

struct  SceUsbAccPacket
 Command packet sent from the PSP to an accessory by sceUsbAccIntrInReq. More...
 

Typedefs

typedef struct SceUsbAccPacket SceUsbAccPacket
 Command packet sent from the PSP to an accessory by sceUsbAccIntrInReq.
 

Enumerations

enum  PspUsbAccType { PSP_USBACC_TYPE_MIC = 0x01 , PSP_USBACC_TYPE_CAMERA = 0x02 , PSP_USBACC_TYPE_GPS = 0x04 , PSP_USBACC_TYPE_DMB = 0x08 }
 Accessory type bits used with sceUsbAccRegisterType / sceUsbAccUnregisterType. More...
 

Functions

int sceUsbAccRegisterType (u16 type)
 Registers the accessory type(s) the caller handles (PspUsbAccType bits).
 
int sceUsbAccUnregisterType (u16 type)
 Unregisters accessory type(s) previously registered with sceUsbAccRegisterType.
 
int sceUsbAccIntrInReq (struct UsbdDeviceReq *req)
 Queues a packet to be sent from the PSP to the accessory on the interrupt endpoint (EP 0x81).
 

Typedef Documentation

◆ SceUsbAccPacket

typedef struct SceUsbAccPacket SceUsbAccPacket

Command packet sent from the PSP to an accessory by sceUsbAccIntrInReq.

The caller places one of these in the UsbdDeviceReq data buffer.

Enumeration Type Documentation

◆ PspUsbAccType

Accessory type bits used with sceUsbAccRegisterType / sceUsbAccUnregisterType.

Enumerator
PSP_USBACC_TYPE_MIC 

Microphone.

PSP_USBACC_TYPE_CAMERA 

Camera.

PSP_USBACC_TYPE_GPS 

GPS receiver.

PSP_USBACC_TYPE_DMB 

DMB / 1Seg TV tuner.

Function Documentation

◆ sceUsbAccIntrInReq()

int sceUsbAccIntrInReq ( struct UsbdDeviceReq * req)

Queues a packet to be sent from the PSP to the accessory on the interrupt endpoint (EP 0x81).

req->data must point to a SceUsbAccPacket.

Available on firmware 2.70 and higher only.

Parameters
req- UsbdDeviceReq whose data points to a filled SceUsbAccPacket
Returns
0 on success, PSP_USB_ERROR_BUS_DRIVER_NOT_STARTED if no accessory is attached, PSP_USB_ERROR_INVALID_ARGUMENT if the payload is too long

◆ sceUsbAccRegisterType()

int sceUsbAccRegisterType ( u16 type)

Registers the accessory type(s) the caller handles (PspUsbAccType bits).

An accessory is accepted only if it advertises every registered type (none registered = any accessory accepted).

Available on firmware 2.70 and higher only.

Parameters
type- mask of accessory type bits to register
Returns
0 on success, PSP_USB_ERROR_ALREADY_DONE if any requested bit is already registered

◆ sceUsbAccUnregisterType()

int sceUsbAccUnregisterType ( u16 type)

Unregisters accessory type(s) previously registered with sceUsbAccRegisterType.

Available on firmware 2.70 and higher only.

Parameters
type- mask of accessory type bits to unregister
Returns
0 on success, PSP_USB_ERROR_DRIVER_NOT_FOUND if none of the requested bits was registered