Prepare to support normal dualsense

This commit is contained in:
Denis Benato 2024-01-05 23:37:05 +01:00
parent 43b3871a7a
commit b27f1778e3
8 changed files with 76 additions and 21 deletions

View file

@ -15,6 +15,8 @@ typedef struct virt_dualsense {
bool bluetooth;
bool edge_model;
uint8_t seq_num;
uint32_t dt_sum;
@ -25,15 +27,33 @@ typedef struct virt_dualsense {
int64_t last_time;
} virt_dualsense_t;
int virt_dualsense_init(virt_dualsense_t *const gamepad, bool bluetooth);
int virt_dualsense_init(
virt_dualsense_t *const gamepad,
bool bluetooth,
bool dualsense_edge
);
int virt_dualsense_get_fd(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 virt_dualsense_event(
virt_dualsense_t *const gamepad,
gamepad_status_t *const out_device_status
);
void virt_dualsense_compose(virt_dualsense_t *const gamepad, gamepad_status_t *const in_device_status, uint8_t *const out_buf);
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);
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_dualsense_close(
virt_dualsense_t *const gamepad
);