summaryrefslogtreecommitdiff
path: root/include/user/hid.h
blob: 327fce3c358638898662db27bdd495fba1f85298 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef _PSP2_HID_H_
#define _PSP2_HID_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <psp2/types.h>

typedef struct SceHidKeyboardReport {
	SceUInt8 unk0[2];
	SceUInt8 modifier;
	SceUInt8 key1;
	SceUInt8 key2;
	SceUInt8 key3;
	SceUInt8 key4;
	SceUInt8 key5;
	SceUInt8 key6;
	SceUInt8 unk1[15];
	
} SceHidKeyboardReport;

#define SCE_HID_KEYBOARD_MAX_REPORT 16

/**
 * Enumerate hid keyboards.
 *
 * @param[out]	handle	Hid handle.
 * @param[int]	port?	Use 1.
 */
int sceHidKeyboardEnumerate(int* handle, int port);


/**
 * Get hid keyboard reports.
 *
 * @param[in]	handle		Hid handle.
 * @param[in]	reports		Buffer to receive reports.
 * @param[in]	nReports	Number of reports to receive.
 */
int sceHidKeyboardRead(SceUInt32 handle, SceHidKeyboardReport *reports[], int nReports);

#ifdef __cplusplus
}
#endif

#endif