1
0
mirror of https://github.com/gdsports/USBHost_t36 synced 2024-11-24 01:52:23 -05:00
Commit Graph

13 Commits

Author SHA1 Message Date
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
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
4e2ea2d96e String buffers - Devices contribute buffers
instead of having each HUB have 7 buffers, which can eat up space.  We have each main object contribute currently one string buffer, which than when we initialize a Device_t we try to allocate one for it, likewise we release it when the Device is released.

Hopefully less memory needed.

Also updated such that the HIDInput classes can not retrieve these strings.

Changed test program to now also have list of HIDInput objects and when I detect a new one, I again print out info on it...
2017-10-19 14:57:52 -07:00
PaulStoffregen
f1bb020282 Fix print() & println() conflict with Arduino Print class 2017-10-15 13:11:46 -07:00
Kurt Eckhardt
dbe5292471 Keyboard HID extras plus map extra keys
This delta, adds an extra keyboard object to handle those keys that are not part of the main keyboard class.  In particular there are separate HID reports for some of the keys, such as Power keys, and multimedia keys.

These reports might be on separate Interface or in cases where the mouse and keyboard are on the same device, the extra reports may be on the Mouse Interface.

So far I have not tried to combine with Keyboard object as might require multiple inheritance which I would like to avoid.

Also I extended the special key mapping table to map several other keys like F1-12, Arrow, Home/end... To special values where the 0x80 bit is set.  I used the same values as used for the Arduino Keyboard library.  I did not use their defines as they used defines like KEY_F1, which already exists in core, but in core it is the scan code from the keyboard and not the end user value.
2017-10-12 10:27:41 -07:00
PaulStoffregen
1e6d0db268 Do not let HID parser claim boot protocol keyboards 2017-10-08 03:37:00 -07:00
Kurt Eckhardt
6bec8b60ee PS3 - Right Joystick does not work
There is an issue with the extra items added to the report after the main known items.

Problem was HID report descriptor does something like:
Usage Page; Desktop  (01)
Usage: 01  (Pointer)
Count xxx

Problem is the Usage values below 0x20 appear to have some other standard meaning.   Which you can see in
http://www.usb.org/developers/hidpage/Hut1_12v2.pdf

So current fix is to ignore Usage values passed in < 0x20...
Appears to fix PS3 Right joystick
2017-09-13 18:40:40 -07:00
PaulStoffregen
356700d9d5 Add special PS3 start command to HID parser 2017-09-11 12:09:14 -07:00
PaulStoffregen
fbd0c51992 Opps, don't try to use null pipe in hid parser 2017-09-11 11:02:02 -07:00
PaulStoffregen
f58ed079a6 Mouse using HID parser 2017-09-10 03:48:10 -07:00
PaulStoffregen
c2adf01769 Add some comments 2017-09-09 18:01:56 -07:00
PaulStoffregen
c94c873bb2 Handle report IDs in HID parser 2017-09-09 12:14:22 -07:00
PaulStoffregen
d9ad2cc78f Generic HID parser, initial commit 2017-09-09 11:17:50 -07:00