RetroArch
syshid.h
Go to the documentation of this file.
1 #pragma once
2 #include <wiiu/types.h>
3 
4 typedef struct
5 {
13 
16 
17 } HIDDevice;
18 
19 typedef struct _HIDClient HIDClient;
20 
21 #define HID_DEVICE_DETACH 0
22 #define HID_DEVICE_ATTACH 1
23 
24 typedef int32_t (*HIDAttachCallback)(HIDClient *p_hc,HIDDevice *p_hd,uint32_t attach);
25 
26 struct _HIDClient
27 {
30 };
31 
32 typedef void (*HIDCallback)(uint32_t handle,int32_t error,uint8_t *p_buffer,uint32_t bytes_transferred,void *p_user);
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 
39 int32_t
40 HIDSetup(void);
41 
42 int32_t
43 HIDTeardown(void);
44 
45 int32_t
46 HIDAddClient(HIDClient *p_client,
47  HIDAttachCallback attach_callback);
48 int32_t
49 HIDDelClient(HIDClient *p_client);
50 
51 int32_t
53  uint8_t descriptor_type,
54  uint8_t descriptor_index,
55  uint16_t language_id,
56  uint8_t *p_buffer,
57  uint32_t buffer_length,
58  HIDCallback hc,
59  void *p_user);
60 
61 int32_t
63  uint8_t descriptor_type,
64  uint8_t descriptor_index,
65  uint16_t language_id,
66  uint8_t *p_buffer,
67  uint32_t buffer_length,
68  HIDCallback hc,
69  void *p_user);
70 
71 int32_t
72 HIDGetReport(uint32_t handle,
73  uint8_t report_type,
74  uint8_t report_id,
75  uint8_t *p_buffer,
76  uint32_t buffer_length,
77  HIDCallback hc,
78  void *p_user);
79 
80 int32_t
81 HIDSetReport(uint32_t handle,
82  uint8_t report_type,
83  uint8_t report_id,
84  uint8_t *p_buffer,
85  uint32_t buffer_length,
86  HIDCallback hc,
87  void *p_user);
88 
89 int32_t
90 HIDSetIdle(uint32_t handle,
91  uint8_t interface_index,
92  uint8_t duration,
93  HIDCallback hc,
94  void *p_user);
95 
96 int32_t
98  uint8_t interface_index,
99  uint8_t protocol,
100  HIDCallback hc,
101  void *p_user);
102 
103 int32_t
104 HIDGetProtocol(uint32_t handle,
105  uint8_t interface_index,
106  uint8_t * protocol,
107  HIDCallback hc,
108  void *p_user);
109 
110 int32_t
111 HIDRead(uint32_t handle,
112  uint8_t *p_buffer,
113  uint32_t buffer_length,
114  HIDCallback hc,
115  void *p_user);
116 
117 int32_t
118 HIDWrite(uint32_t handle,
119  uint8_t *p_buffer,
120  uint32_t buffer_length,
121  HIDCallback hc,
122  void *p_user);
123 
124 #ifdef __cplusplus
125 }
126 #endif
HIDClient * next
Definition: syshid.h:28
int32_t HIDAddClient(HIDClient *p_client, HIDAttachCallback attach_callback)
uint16_t vid
Definition: syshid.h:8
int32_t HIDSetDescriptor(uint32_t handle, uint8_t descriptor_type, uint8_t descriptor_index, uint16_t language_id, uint8_t *p_buffer, uint32_t buffer_length, HIDCallback hc, void *p_user)
uint8_t sub_class
Definition: syshid.h:11
int32_t HIDWrite(uint32_t handle, uint8_t *p_buffer, uint32_t buffer_length, HIDCallback hc, void *p_user)
uint16_t max_packet_size_tx
Definition: syshid.h:15
int32_t HIDGetProtocol(uint32_t handle, uint8_t interface_index, uint8_t *protocol, HIDCallback hc, void *p_user)
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
uint8_t protocol
Definition: syshid.h:12
int32_t HIDSetup(void)
Definition: syshid.h:26
void(* HIDCallback)(uint32_t handle, int32_t error, uint8_t *p_buffer, uint32_t bytes_transferred, void *p_user)
Definition: syshid.h:32
int32_t HIDSetIdle(uint32_t handle, uint8_t interface_index, uint8_t duration, HIDCallback hc, void *p_user)
int32_t HIDGetDescriptor(uint32_t handle, uint8_t descriptor_type, uint8_t descriptor_index, uint16_t language_id, uint8_t *p_buffer, uint32_t buffer_length, HIDCallback hc, void *p_user)
static l_noret error(LoadState *S, const char *why)
Definition: lundump.c:39
int32_t HIDSetReport(uint32_t handle, uint8_t report_type, uint8_t report_id, uint8_t *p_buffer, uint32_t buffer_length, HIDCallback hc, void *p_user)
Definition: syshid.h:4
uint8_t interface_index
Definition: syshid.h:10
signed int int32_t
Definition: stdint.h:123
HIDAttachCallback attach_cb
Definition: syshid.h:29
int32_t HIDGetReport(uint32_t handle, uint8_t report_type, uint8_t report_id, uint8_t *p_buffer, uint32_t buffer_length, HIDCallback hc, void *p_user)
uint16_t pid
Definition: syshid.h:9
int32_t HIDDelClient(HIDClient *p_client)
uint32_t physical_device_inst
Definition: syshid.h:7
uint32_t handle
Definition: syshid.h:6
int32_t(* HIDAttachCallback)(HIDClient *p_hc, HIDDevice *p_hd, uint32_t attach)
Definition: syshid.h:24
uint16_t max_packet_size_rx
Definition: syshid.h:14
int32_t HIDRead(uint32_t handle, uint8_t *p_buffer, uint32_t buffer_length, HIDCallback hc, void *p_user)
int32_t HIDSetProtocol(uint32_t handle, uint8_t interface_index, uint8_t protocol, HIDCallback hc, void *p_user)
unsigned short uint16_t
Definition: stdint.h:125
int32_t HIDTeardown(void)
unsigned char uint8_t
Definition: stdint.h:124
unsigned int uint32_t
Definition: stdint.h:126