Commit graph

1329 commits

Author SHA1 Message Date
tomasyk f66d02d608 Remove comparing bufffer functionality
I am using HID for Oregon Scientific WMRS200, and polling reports removed any sequence of 2 or more identical characters, e.g. instead valid sequence
FF FF 0 42 0 B8 0 2C 3C 0 0 0 62 1
i get
FF 0 42 0 B8 0 2C 3C 0 62 1
There is no need to compare previous buffer with current buffer, as they can be identical and still this should not be ignored. My sequences are built from smaller sequences, where first byte is lenght of sequence to concatenate. Usually it is concatenated from sequences of 1 byte. E.g. 01 FF, 01 FF, 01 00, 01 42 etc. But current code is filtering second 01 FF and result is only one FF in sequence, instead of FF FF. Filtering is not needed, because data are obtained using inTransfer.
2021-01-13 10:56:16 +01:00
Kristian Sloth Lauszus a60d277427
Merge pull request #583 from DanielGibson/fix-hidInterfaces-overflow
HIDUniversal, HIDComposite: Don't overflow hidInterfaces[] or epInfo[]
2021-01-13 10:25:01 +01:00
Daniel Gibson 3658dc68f3 Increase USBHID::maxHidInterfaces from 3 to 5
It's not that uncommon to have more than three HID interfaces in a
USB device - even an Arduino Leonardo (or Pro Micro) always has
two just for the CDC; if you add a Boot Keyboard HID interface and
one generic HID interface for consumer control (multimedia) keys
you already have four..
Many commercial gaming keyboards also have more then three interfaces
(I don't think they really need that many but it is what it is).
2021-01-13 08:59:33 +01:00
Daniel Gibson 6d7984ade2 Log info when not adding Interface/Endpoint because max is reached 2021-01-13 07:14:36 +01:00
Kristian Sloth Lauszus a1dd6ff890
Merge pull request #574 from dmadison/xbox-core
Add Xbox Core Controller PID
2021-01-12 21:09:05 +01:00
Daniel Gibson 59af2be74f HIDUniversal, HIDComposite: Don't overflow hidInterfaces[] or epInfo[]
If a connected device has more than 3 (maxHidInterfaces) HID interfaces,
which is not unusual with modern keyboards, EndpointXtract() wrote
beyond the hidInterfaces[] array and corrupted bHasReportId, PID + VID.

The same could happen with the epInfo[] array.
Now this is fixed by checking bNumIface/bNMumEP before adding new
elements to those arrays.
2021-01-12 01:42:48 +01:00
Kristian Sloth Lauszus 757f428234 Release version 1.4.0 2021-01-07 20:54:46 +01:00
David Madison 4dfda5a151 Add Xbox Core Controller PID 2020-12-08 13:21:59 -05:00
Kristian Sloth Lauszus 9d41161c12
Merge pull request #571 from YuuichiAkagawa/pr_midi_serial_flush
Add Serial.flush() option for MIDI examples
2020-12-03 17:20:16 +01:00
Yuuichi Akagawa c43e08b445 Add Serial.flush() option for MIDI examples 2020-12-02 00:29:56 +09:00
Kristian Sloth Lauszus 1ee088bcad
Merge pull request #566 from YuuichiAkagawa/pr_usbh_midi_050
Pr usbh midi 050
2020-11-23 14:38:17 +01:00
Yuuichi Akagawa bfe134bf39 Added a link to the article 2020-11-23 21:51:36 +09:00
Yuuichi Akagawa cf0fad4045 Change to Windows style enumeration process.
Some devices return only 8 bytes of Device Descriptor by default address.
(e.g. Novation Circuit)
2020-11-23 20:08:07 +09:00
Yuuichi Akagawa 86ac217305 Update vender specific code for Novation 2020-11-23 09:59:31 +09:00
Kristian Sloth Lauszus f8217818a5 Updated link to James's PS4 guides 2020-11-18 20:22:02 +01:00
Kristian Sloth Lauszus 4e8d5e8a06 Always generate the documentation, so it is always in sync with the master branch 2020-11-18 20:20:53 +01:00
Kristian Sloth Lauszus c8ef5d5550 Check out the repo before generating the documentation 2020-11-18 19:42:13 +01:00
Kristian Sloth Lauszus 2c82f4e4c6 Forgot to add sudo when installing documentation dependencies 2020-11-18 19:06:27 +01:00
Kristian Sloth Lauszus 718596a7f7
Merge pull request #564 from felis/teensy4x
Added support for Teensy 4.0 and 4.1
2020-11-18 18:33:38 +01:00
Kristian Sloth Lauszus 9f92baf191 Use Github actions, as Travis is too slow 2020-11-18 17:38:05 +01:00
Kristian Sloth Lauszus e78795af22 Only use spi4teensy3 on Teensy 3.x 2020-11-17 19:52:56 +01:00
Kristian Sloth Lauszus 71aeadeab1 Added support for Teensy 4.0 and 4.1
Fixes #529, fixes #560
2020-11-17 15:23:26 +01:00
Kristian Sloth Lauszus 23ba34da47
Merge pull request #517 from fraca7/control-report-callback
Add a ParseBTHIDControlData virtual method similar to ParseBTHIDData,
2020-11-16 12:58:29 +01:00
Kristian Sloth Lauszus 1399dbf639
Merge pull request #471 from felis/XBOXONES
Xbox One S controller support
2020-11-16 09:31:36 +01:00
Kristian Sloth Lauszus 0519b43456 Do not compile the bidirectional_converter.ino for Teensy 3.5 and 3.6, as there is some conflict with the MIDI library
See: https://travis-ci.org/github/felis/USB_Host_Shield_2.0/jobs/743787235
2020-11-15 23:36:05 +01:00
Kristian Sloth Lauszus 96aae6667b Do not compile the Wii.ino example on the Arduino Uno, as it will not fit 2020-11-15 23:36:05 +01:00
Kristian Sloth Lauszus 1121d8d9ad Updated my email and full name 2020-11-15 23:36:05 +01:00
Kristian Sloth Lauszus edc5198976 Fix 'warning: this statement may fall through [-Wimplicit-fallthrough=]'
Closes #532
2020-11-15 23:27:29 +01:00
Kristian Sloth Lauszus 30931efed8 Merge remote-tracking branch 'origin/master' into XBOXONES 2020-11-15 23:25:04 +01:00
Kristian Sloth Lauszus e101482478 Updated Travis to use Python 3.9 and added the 'XBOXONESBT.ino' example 2020-11-15 19:30:54 +01:00
Kristian Sloth Lauszus f500cc9b4c Only use simple pairing with the Xbox One S controller, as it did not work with the PS4 2020-11-15 19:18:57 +01:00
Kristian Sloth Lauszus 102746ef6b Xbox One S controller support is now finally working 2020-11-15 19:14:30 +01:00
Kristian Sloth Lauszus ad9360b865 Yet another go at getting the Xbox One S controller working
It just connects and opens a SDP channel it then disconnects the SDP channel and I get a "Paring Faild: 05 (Authentication Failure)"

For some reason I never receive the "IO Capability Request" event
2020-11-15 19:14:30 +01:00
Kristian Sloth Lauszus 8d7265f92c Try to figure out which HCI command that is failing 2020-11-15 19:14:30 +01:00
Kristian Sloth Lauszus 7714e807f6 Added SDP support to the BTHID, as needed for the Xbox One S controller 2020-11-15 19:13:54 +01:00
Kristian Sloth Lauszus a347b3bace Enable simple paring mode 2020-11-15 19:13:49 +01:00
Kristian Sloth Lauszus 30ac619331 Initial code for Xbox One S controller support
I lack a dongle that support simply paring, so it has been confirmed working yet
2020-11-15 19:13:49 +01:00
Jérôme Laheurte f075ea3025 Add a ParseBTHIDControlData virtual method similar to ParseBTHIDData,
for reports that are sent through the control pipe. This happens for
instance in response to a GET_REPORT.
2020-02-28 18:03:16 +01:00
Oleg Mazurov cd87628af4
Update README.md 2019-09-13 08:42:30 -06:00
Oleg Mazurov 0f09c9733f
Update README.md 2019-09-13 08:40:23 -06:00
Oleg Mazurov 0eba979277
Update README.md 2019-09-13 08:29:35 -06:00
Oleg Mazurov 780bd4e968
Update README.md 2019-09-12 10:15:33 -06:00
Oleg Mazurov bc09e75d8f
Update README.md 2019-09-12 09:50:59 -06:00
Oleg Mazurov f85e42d722
Update README.md 2019-09-11 16:23:51 -06:00
Oleg Mazurov c04a107bda
Update README.md 2019-09-11 16:22:34 -06:00
Kristian Sloth Lauszus 156a1d83f3
Merge pull request #483 from felis/maybe-uninitialized
Fixed Travis build for Arduino Due
2019-08-31 18:12:42 +02:00
Kristian Sloth Lauszus b62528d813 Just get the endpoint address directly from the epInfo struct 2019-08-31 13:13:18 +02:00
Kristian Sloth Lauszus 912decede5 We need to make room for the control endpoint in the HIDInterface struct as well
This is needed as the in and out endpoint are defined as follows:

static const uint8_t epInterruptInIndex = 1; // InterruptIN  endpoint index
static const uint8_t epInterruptOutIndex = 2; // InterruptOUT endpoint index

And maxEpPerInterface is set to 2.

See: https://travis-ci.org/felis/USB_Host_Shield_2.0/jobs/569260660
2019-08-08 13:54:54 +02:00
Kristian Sloth Lauszus d182729ed8 Run the Due build separatly 2019-08-08 11:30:09 +02:00
Kristian Sloth Lauszus 224276cb23 Disable misleading-indentation warning for now
See: https://travis-ci.org/felis/USB_Host_Shield_2.0/jobs/569237654 and https://github.com/arduino/ArduinoCore-sam/issues/69
2019-08-08 10:46:41 +02:00