Add a base Dualshock4 controller implementation

Haptics on Dualshock4 devices are typically not supported by OS-level
haptics APIs, so in order to support vibration effects on these devices
we issue device-specific reports using the raw HID protocol.
Dualshock4ControllerBase implements the common logic for creating the
report buffer from the vibration intensity values. Users should
implement WriteOutputReport to provide the OS-specific logic for sending
the report to the device.

BUG=749295

Change-Id: I742316f385235b44c0658dd9e571fa73cf4f496e
Reviewed-on: https://chromium-review.googlesource.com/810053
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526608}
3 files changed