summaryrefslogtreecommitdiff
path: root/examples/host/hid_controller/src
diff options
context:
space:
mode:
authorGordon McNab <[email protected]>2021-12-08 08:36:43 +0000
committerGordon McNab <[email protected]>2021-12-08 08:36:43 +0000
commit9a7db985931ae215e808d40e7bacd52535d45305 (patch)
treea4d75e2c3823766da53a006280c0d805630d996e /examples/host/hid_controller/src
parentedf3f3501656b010ad4a9e1d0a0d62573dd0b3fb (diff)
parentcde824f17f73b5ce4fcec8c176827297854a76c2 (diff)
Merge branch 'master' into port-ft90x
Diffstat (limited to 'examples/host/hid_controller/src')
-rw-r--r--examples/host/hid_controller/src/hid_app.c8
-rw-r--r--examples/host/hid_controller/src/main.c1
2 files changed, 8 insertions, 1 deletions
diff --git a/examples/host/hid_controller/src/hid_app.c b/examples/host/hid_controller/src/hid_app.c
index c61ce70f3..582e01959 100644
--- a/examples/host/hid_controller/src/hid_app.c
+++ b/examples/host/hid_controller/src/hid_app.c
@@ -111,7 +111,11 @@ static inline bool is_sony_ds4(uint8_t dev_addr)
uint16_t vid, pid;
tuh_vid_pid_get(dev_addr, &vid, &pid);
- return (vid == 0x054c && pid == 0x09cc);
+ return ( (vid == 0x054c && (pid == 0x09cc || pid == 0x05c4)) // Sony DualShock4
+ || (vid == 0x0f0d && pid == 0x005e) // Hori FC4
+ || (vid == 0x0f0d && pid == 0x00ee) // Hori PS4 Mini (PS4-099U)
+ || (vid == 0x1f4f && pid == 0x1002) // ASW GG xrd controller
+ );
}
//--------------------------------------------------------------------+
@@ -134,6 +138,8 @@ void hid_app_task(void)
// therefore report_desc = NULL, desc_len = 0
void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* desc_report, uint16_t desc_len)
{
+ (void)desc_report;
+ (void)desc_len;
uint16_t vid, pid;
tuh_vid_pid_get(dev_addr, &vid, &pid);
diff --git a/examples/host/hid_controller/src/main.c b/examples/host/hid_controller/src/main.c
index e13fa818a..b9b37a4d2 100644
--- a/examples/host/hid_controller/src/main.c
+++ b/examples/host/hid_controller/src/main.c
@@ -49,6 +49,7 @@ int main(void)
board_init();
printf("TinyUSB Host HID Controller Example\r\n");
+ printf("Note: Events only displayed for explictly supported controllers\r\n");
tusb_init();