vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:

#include <psp2/hid.h>


Link the library to the executable:

SceHid_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (0x18, SceHidKeyboardReport)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceHidMouseReport)
 
int sceHidKeyboardEnumerate (int *handle, int count)
 Enumerate hid keyboards. More...
 
int sceHidKeyboardRead (SceUInt32 handle, SceHidKeyboardReport *reports[], int nReports)
 Get hid keyboard reports (blocking). More...
 
int sceHidKeyboardPeek (SceUInt32 handle, SceHidKeyboardReport *reports[], int nReports)
 Get hid keyboard reports (non-blocking). More...
 
int sceHidMouseEnumerate (int *handle, int count)
 Enumerate hid mice. More...
 
int sceHidMouseRead (SceUInt32 handle, SceHidMouseReport *reports[], int nReports)
 Get hid mouse reports. More...
 

Macros

#define SCE_HID_MAX_REPORT   16
 
#define SCE_HID_MAX_DEVICE_COUNT   8
 

Data Structure Documentation

◆ SceHidKeyboardReport

struct SceHidKeyboardReport
Data Fields
SceUInt8 reserved
SceUInt8 modifiers[2]
SceUInt8 keycodes[6]
SceUInt8 reserved2[7]
SceUInt64 timestamp

◆ SceHidMouseReport

struct SceHidMouseReport
Data Fields
SceUInt8 buttons
SceUInt8 reserved
SceInt16 rel_x
SceInt16 rel_y
SceInt8 wheel
SceInt8 tilt
SceUInt64 timestamp

Macro Definition Documentation

◆ SCE_HID_MAX_REPORT

#define SCE_HID_MAX_REPORT   16

◆ SCE_HID_MAX_DEVICE_COUNT

#define SCE_HID_MAX_DEVICE_COUNT   8

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/2]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceHidKeyboardReport   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/2]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceHidMouseReport   
)

◆ sceHidKeyboardEnumerate()

int sceHidKeyboardEnumerate ( int *  handle,
int  count 
)

Enumerate hid keyboards.

Parameters
[out]handleBuffer to receive keyboard hid handles.
[int]count Number of keyboards to enumerate

◆ sceHidKeyboardRead()

int sceHidKeyboardRead ( SceUInt32  handle,
SceHidKeyboardReport reports[],
int  nReports 
)

Get hid keyboard reports (blocking).

Parameters
[in]handleHid handle.
[in]reportsBuffer to receive reports.
[in]nReportsNumber of reports to receive.

◆ sceHidKeyboardPeek()

int sceHidKeyboardPeek ( SceUInt32  handle,
SceHidKeyboardReport reports[],
int  nReports 
)

Get hid keyboard reports (non-blocking).

Parameters
[in]handleHid handle.
[in]reportsBuffer to receive reports.
[in]nReportsNumber of reports to receive.

◆ sceHidMouseEnumerate()

int sceHidMouseEnumerate ( int *  handle,
int  count 
)

Enumerate hid mice.

Parameters
[out]handleBuffer to receive mouse hid handles.
[int]count Number of mice to enumerate

◆ sceHidMouseRead()

int sceHidMouseRead ( SceUInt32  handle,
SceHidMouseReport reports[],
int  nReports 
)

Get hid mouse reports.

Parameters
[in]handleHid handle.
[in]reportsBuffer to receive reports.
[in]nReportsNumber of reports to receive.