Commit Graph

9 Commits

Author SHA1 Message Date
gdsports a7ff79e584 Add support for Xbox 360 USB controller 2018-11-24 13:44:37 -10:00
Kurt Eckhardt eaad0684f2 XBox360 Wireless controller
Support for using the Microsoft XBox 360 wireless receiver for windows
to be able to communicate with XBox 360 wireless controllers.

In theory this should support up to 4 controllers.  So far I have only
tested with one as I only have one.

Added a joystick only test that should support up to 4 joystick objects.
2018-03-11 16:06:04 -07:00
Kurt Eckhardt 51d862e521 XBox1 controller rumble support
Was able to find the issue with the XBox1 controller code not causing the controller to rumble.
2018-01-17 06:28:28 -08:00
Kurt Eckhardt 68c2585a56 Joystick - USB enhance More Axis, Rumble, LEDS
Added support for Joysticks, that on some of them we can not receive more of the Joysticks axis.  So far mainly on PS3 and PS4.  So you can now get the Gyro/accel stuff.  You get feedback on the DS4 touch area, PS3 you can get the pressure values on several of the buttons.  LIke the RT/LT ones.

In addition added some support for Rumble.  So far it appears to be working somewhat on the PS3 and PS4 controllers.  On the PS4 you can also set the RGB LED light values and on the PS3 you can set the 4 LEDS on the front., which are normally used to say which controller it is.
2018-01-11 07:09:22 -08:00
Kurt Eckhardt a1986c3d30 Add 2nd VID:PID for XBox One
As per forum post by linarism, added 2nd XBox controller PID
2017-12-11 06:26:36 -08:00
Kurt Eckhardt c5edb1c25f Add Xbox One controller support
While the other Joystick objects currently supported by the USB Host
code are driven by HID data, the Xbox does not contain HID data and
instead works at the top level.

To handle this I made the Joystick object use multiple InHeritence like:
class JoystickController : public USBDriver, public USBHIDInput

This allowed me to have the object work either way.  This did add some
complexity in that some of the methods like  is the object connected
(The bool operator) had to be overwritten as both of the bases classes
had it.  In addition needed to update the other query functions to be
able to grab the data from mydevice or device depending on which type of
controller was connected.

Since this looked like a valid way, I then merged the Keyboard Extras
code that Keyboard and made it also do a similar multiple inheritance.
In this case however I restricted the HID top level report handle code
to only accept it if on the same object that claimed the keyboard.

The mouse test app was updated as well
2017-11-20 09:19:25 -08:00
Kurt Eckhardt 8aa67ff939 RAWHID Support
Needed HID Parser to support Bidirectional Transfers

The HidParser code was setup such that the claim for a report, the caller could say I want to claim the whole thinig and allowed callback functions for processing of in buffer and out buffer.

Allow RawHID to contribute Transfer_t

Since RawHID may need more resources than most, maybe it should contribute the additional structures

The constructor for a RAWHID object allows you to specify the top usage
that it wishes to connect to.  I used this for example to be able to
connect to a Teensy with the RAWHID associated with emulating the
Serial object.

If a HID Input class says that it wants to claim the whole interface, I
reuse the buffer associated with holding the HID descriptor and use it
for output buffers.
2017-11-20 08:54:56 -08:00
Kurt Eckhardt d792ffd2e8 PS4 support
Had to increase size of HID report to 512.
Allow HAT to work 10039

Mouse Example prints out Z, Rz, Ry, Rx and Hat values
2017-09-12 06:57:19 -07:00
PaulStoffregen 6e34e81fcf Add Joystic driver 2017-09-11 18:32:16 -07:00