gdsports / USB_Host_Library_SAMD

USB host library 2.0 for Zero/M0/SAMD
126 stars 39 forks source link

Added support for PS5USB controllers #12

Open josephduchesne opened 4 years ago

josephduchesne commented 4 years ago

Added initial support for PS5 controllers by creating a combination of the PS4 controller class and Ludwig Füchsl's DualSense Windows driver https://github.com/Ohjurot/DualSense-Windows

This supports all of the feature's that @Ohjurot supported in his driver, including 3 different haptic modes.

Since the force feedback in the triggers is pretty complicated, I used the DualSense Windows functions and datastructures with minimual modification, which is why the PS5Trigger.h and PS5Trigger.cpp files retain their source license and copyright (MIT license). I don't believe that this is a problem given that the explicitly copied code sections are all properly licensed and attributed as far as I can tell.

I have only included the USB class, however it should be relatively straight forward to create a Bluetooth version. I just don't have a great hardware setup for that, and my use case prefers USB.

Ohjurot commented 4 years ago

@josephduchesne Nice to see that! From my side the comments with the attribution and license in the source code is totally fine for this project.