RetroArch
hid_device_driver.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3  * Copyright (C) 2011-2017 - Daniel De Matteis
4  *
5  * RetroArch is free software: you can redistribute it and/or modify it under the terms
6  * of the GNU General Public License as published by the Free Software Found-
7  * ation, either version 3 of the License, or (at your option) any later version.
8  *
9  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  * PURPOSE. See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along with RetroArch.
14  * If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef HID_DEVICE_DRIVER__H
18 #define HID_DEVICE_DRIVER__H
19 
20 #include "../../input_driver.h"
21 #include "../../connect/joypad_connection.h"
22 #include "../../include/hid_driver.h"
23 #include "../../include/gamepad.h"
24 #include "../../../verbosity.h"
25 #include "../../../tasks/tasks_internal.h"
26 
27 typedef struct hid_device {
28  void *(*init)(void *handle);
29  void (*free)(void *data);
30  void (*handle_packet)(void *data, uint8_t *buffer, size_t size);
31  bool (*detect)(uint16_t vid, uint16_t pid);
32  const char *name;
33 } hid_device_t;
34 
39 
43 bool hid_init(hid_driver_instance_t *instance, hid_driver_t *hid_driver, input_device_driver_t *pad_driver, unsigned slots);
44 void hid_deinit(hid_driver_instance_t *instance);
45 
46 #endif /* HID_DEVICE_DRIVER__H */
bool(* detect)(uint16_t vid, uint16_t pid)
Definition: hid_device_driver.h:31
GLuint buffer
Definition: glext.h:6555
void hid_pad_deregister(joypad_connection_t *pad)
Definition: hid_device_driver.c:63
hid_driver_instance_t hid_instance
Definition: hid_device_driver.c:19
GLsizeiptr size
Definition: glext.h:6559
const char * name
Definition: hid_device_driver.h:32
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
void hid_deinit(hid_driver_instance_t *instance)
Definition: hid_device_driver.c:138
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
typedef bool(RETRO_CALLCONV *retro_replace_image_index_t)(unsigned index
joypad_connection_t * hid_pad_register(void *pad_handle, pad_connection_interface_t *iface)
Definition: hid_device_driver.c:39
Definition: hid_driver.h:76
joypad_connection_t * slots
Definition: btstack_hid.c:629
void(* handle_packet)(void *data, uint8_t *buffer, size_t size)
Definition: hid_device_driver.h:30
hid_device_t * hid_device_driver_lookup(uint16_t vendor_id, uint16_t product_id)
Definition: hid_device_driver.c:28
Definition: joypad_connection.h:54
hid_device_t ds4_hid_device
Definition: device_ds4.c:85
bool hid_init(hid_driver_instance_t *instance, hid_driver_t *hid_driver, input_device_driver_t *pad_driver, unsigned slots)
Definition: hid_device_driver.c:104
Definition: joypad_connection.h:47
struct hid_device hid_device_t
Definition: input_driver.h:170
hid_device_t ds3_hid_device
Definition: device_ds3.c:200
Definition: hid_driver.h:36
Definition: hid_device_driver.h:27
void(* free)(void *data)
Definition: hid_device_driver.h:29
hid_device_t wiiu_gca_hid_device
Definition: device_wiiu_gca.c:165
unsigned short uint16_t
Definition: stdint.h:125
unsigned char uint8_t
Definition: stdint.h:124