vitasdk
Documentation of the vitasdk
hid.h
Go to the documentation of this file.
1 
7 #ifndef _PSP2_HID_H_
8 #define _PSP2_HID_H_
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #include <vitasdk/build_utils.h>
15 #include <psp2/types.h>
16 
17 typedef struct SceHidKeyboardReport {
19  SceUInt8 modifiers[2]; //modifiers[0] Standard modifiers Ctrl Shift Alt, modifiers[1] Caps Lock, ..?
22  SceUInt64 timestamp; // microseconds
25 
26 typedef struct SceHidMouseReport {
33  SceUInt64 timestamp; // microseconds
36 
37 #define SCE_HID_MAX_REPORT 16
38 #define SCE_HID_MAX_DEVICE_COUNT 8
39 
46 int sceHidKeyboardEnumerate(int* handle, int count);
47 
48 
56 int sceHidKeyboardRead(SceUInt32 handle, SceHidKeyboardReport *reports[], int nReports);
57 
65 int sceHidKeyboardPeek(SceUInt32 handle, SceHidKeyboardReport *reports[], int nReports);
66 
73 int sceHidMouseEnumerate(int* handle, int count);
74 
75 
83 int sceHidMouseRead(SceUInt32 handle, SceHidMouseReport *reports[], int nReports);
84 
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* _PSP2_HID_H_ */
91 
SceUInt8 modifiers[2]
Definition: hid.h:19
SceInt8 tilt
Definition: hid.h:32
VITASDK_BUILD_ASSERT_EQ(0x18, SceHidKeyboardReport)
int sceHidKeyboardPeek(SceUInt32 handle, SceHidKeyboardReport *reports[], int nReports)
Get hid keyboard reports (non-blocking).
SceUInt8 reserved
Definition: hid.h:28
SceUInt8 reserved2[7]
Definition: hid.h:21
SceUInt8 buttons
Definition: hid.h:27
SceInt16 rel_y
Definition: hid.h:30
int sceHidMouseRead(SceUInt32 handle, SceHidMouseReport *reports[], int nReports)
Get hid mouse reports.
SceUInt8 reserved
Definition: hid.h:18
SceInt8 wheel
Definition: hid.h:31
int sceHidKeyboardEnumerate(int *handle, int count)
Enumerate hid keyboards.
SceInt16 rel_x
Definition: hid.h:29
int sceHidMouseEnumerate(int *handle, int count)
Enumerate hid mice.
int sceHidKeyboardRead(SceUInt32 handle, SceHidKeyboardReport *reports[], int nReports)
Get hid keyboard reports (blocking).
SceUInt64 timestamp
Definition: hid.h:22
SceUInt8 keycodes[6]
Definition: hid.h:20
SceUInt64 timestamp
Definition: hid.h:33
Definition: hid.h:17
Definition: hid.h:26
int16_t SceInt16
Definition: types.h:41
uint64_t SceUInt64
Definition: types.h:51
uint32_t SceUInt32
Definition: types.h:45
int8_t SceInt8
Definition: types.h:35
uint8_t SceUInt8
Definition: types.h:36