bbcr ongoing
This commit is contained in:
parent
27f26bc8d5
commit
0c433477a0
3 changed files with 150 additions and 151 deletions
27
virt_ds5.h
27
virt_ds5.h
|
|
@ -1,7 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include "logic.h"
|
||||
#include "message.h"
|
||||
#include "devices_status.h"
|
||||
|
||||
#undef VIRT_DS5_DEBUG
|
||||
/**
|
||||
* Emulator of the DualSense controller at USB level using USB UHID ( https://www.kernel.org/doc/html/latest/hid/uhid.html ) kernel APIs.
|
||||
*
|
||||
* See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/hid/uhid.txt?id=refs/tags/v4.10-rc3
|
||||
*/
|
||||
typedef struct virt_dualsense {
|
||||
int fd;
|
||||
|
||||
bool debug;
|
||||
} virt_dualsense_t;
|
||||
|
||||
int virt_dualsense_init(virt_dualsense_t *const gamepad);
|
||||
|
||||
int virt_dualsense_get_fd(virt_dualsense_t *const gamepad);
|
||||
|
||||
int virt_dualsense_event(virt_dualsense_t *const gamepad, gamepad_status_t *const out_device_status, int out_message_pipe_fd);
|
||||
|
||||
void virt_dualsense_compose(virt_dualsense_t *const gamepad, gamepad_status_t *const in_device_status, uint8_t *const out_buf);
|
||||
|
||||
int virt_dualsense_send(virt_dualsense_t *const gamepad, uint8_t *const out_buf);
|
||||
|
||||
void virt_dualsense_close(virt_dualsense_t *const gamepad);
|
||||
|
||||
void *virt_ds5_thread_func(void *ptr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue