1
0
mirror of https://github.com/gdsports/USBHost_t36 synced 2024-11-15 13:45:05 -05:00
Commit Graph

180 Commits

Author SHA1 Message Date
PaulStoffregen
62fbf401d2 Improve hub descriptor parsing, find all interfaces 2018-05-26 08:01:05 -07:00
PaulStoffregen
1494a02918 Print USB descriptors in debug output 2018-05-25 05:12:36 -07:00
Paul Stoffregen
fd4842d94b
Merge pull request #19 from KurtE/XBOX-360-Wireless
XBox360 Wireless controller
2018-03-12 05:11:20 -07: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
Paul Stoffregen
5e4707a242
Merge pull request #16 from KurtE/XBOX1-Rumble
XBox1 controller rumble support
2018-01-17 06:49:10 -08: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
Paul Stoffregen
e968a0f49a
Merge pull request #15 from neroroxxx/master
Added getSysExArrayLength(), changed msg_sysex_len to uint16_t
2018-01-15 10:47:42 -08:00
neroroxxx
9753928e00
Added getSysExArrayLength()
Added getSysExArrayLength(), changed msg_sysex_len to uint16_t
2018-01-15 11:21:03 -05:00
Paul Stoffregen
84d1df0065
Merge pull request #14 from KurtE/Joystick_More_Axis_Rumble
Joystick - USB enhance More Axis, Rumble, LEDS
2018-01-14 19:31:25 -08:00
PaulStoffregen
452270da51 Don't forget to blink LED for incoming MIDI device in Interface_16x16 example 2018-01-12 22:27:41 -08:00
PaulStoffregen
be4623b9e3 Add MIDI Interface_16x16 example 2018-01-12 16:01:18 -08:00
PaulStoffregen
c07d78de13 MIDIDevice::send cable input is optional (defaults to cable 0) 2018-01-12 15:51:15 -08:00
PaulStoffregen
02ba9d9028 Debug print only actual received MIDI data (not entire buffer) 2018-01-11 19:58:14 -08:00
PaulStoffregen
6bacd44c58 Use signed values for MIDI pitch bend (same as Arduino MIDI lib) 2018-01-11 19:19:06 -08:00
PaulStoffregen
f59f8a16ef Add MIDI InputFunctions example 2018-01-11 19:02:47 -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
PaulStoffregen
d169a1a387 Fix MIDI getType return values for note on message 2018-01-10 08:29:40 -08:00
PaulStoffregen
aa037a65e5 Fix MIDI ambiguous overload issues 2018-01-09 13:32:52 -08:00
PaulStoffregen
414d4ca39c Attempt workaround for improper USB MIDI sysex message 2018-01-09 12:29:39 -08:00
PaulStoffregen
d2f7e28378 Support for USB MIDI devices using interrupt (not bulk) endpoints 2018-01-09 03:31:43 -08:00
PaulStoffregen
9488eb7280 Update MIDI features to match USB MIDI in TD 1.41 2018-01-09 00:49:17 -08:00
PaulStoffregen
fcfecee43b Initial (but inefficient) MIDI transmit support 2018-01-04 02:37:48 -08:00
PaulStoffregen
133d082760 Clean up bandwidth usage info when deleting a pipe 2017-12-19 15:31:08 -08:00
PaulStoffregen
713bfb1513 Opps, cleanup more device status function stuff 2017-12-15 07:19:13 -08:00
PaulStoffregen
8f09965162 Device status functions must treat device pointer as volatile 2017-12-15 07:18:14 -08:00
PaulStoffregen
ef1452ad84 Don't print debug info by default 2017-12-13 06:05:49 -08:00
PaulStoffregen
bf468645db Placeholder file (needed for Teensyduino installer) 2017-12-13 04:04:49 -08:00
Paul Stoffregen
5cd2d8c799
Merge pull request #13 from KurtE/XBOX1-Keyboard
Xbox1 keyboard
2017-12-13 03:46:51 -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
PaulStoffregen
9e50acd012 Use actual received length when receiving MIDI data 2017-12-07 06:45:29 -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
5737d12b62 Fix hang part 2...
I am not sure if you can also get the same hang in the periodic update list as well, but to be on the safe side added same checks as the one that was hanging.
2017-11-11 13:20:04 -08:00
Kurt Eckhardt
ca070ebcd4 Fix delete delete hang on serial ports
Found the issue where it was freeing transfers from the follow up list, that were also on the QH list which also tried to free it again.

Fix was in the first free list, it checks to see if the item is also in the qh list and does not free it then.
2017-11-11 09:56:46 -08:00
Kurt Eckhardt
4eee8627d2 Serial cleanup - flush, timeout
As per the forum posts, worked on combining the claim code for extracting which endpoints are RX and TX and create the pipes and the like.

Also worked on live cases.  Reading and writing to AX servos... Found some issues Probably more to find.

I left in some debug code to help find cases of deleting a pipe may hang.  Also macros in serial.cpp to set or toggle IO pins (when in debug mode). This helps find where things are happing using Logic Analyzer as a way to find the approriate USB packets.
2017-11-10 16:37:12 -08:00
Kurt Eckhardt
d3e21b04c0 FIX - Keyboard LEDS
The main issue was I used a setup structure on the stack which turned into garbage.  Earlier I thought the data was copied, but it was not...

Found that fixing this resolved the earlier issue where I needed to defer the update.  So removed the defered code, plus use member variable for the one byte output instead of static variable.
2017-11-07 07:08:36 -08:00
Kurt Eckhardt
ec4a7ac24c Support for Silicon labs: CP210x
Did a quick add of support for the Slicon Labs CP210x drivers.  Did similar like messages as FTDI, based on their documents on line:
https://www.silabs.com/documents/public/application-notes/AN571.pdf
2017-11-05 16:25:59 -08:00
Kurt Eckhardt
12be685ab1 Test fixes for different parity and like
I did a quick test using the Serial test app, where I can type in lines like:
#38400,7E1
And it reopens the serial port at the specified baud and format.  Note the formats the test app looks for is 7E1, 7O1, 8N1, 8N2.

Tested on an FTDI, PL2303 and CH341.  I also tested going to Teensy 3.2 CDCACM.  But as far as I know the teensy could not care less about Baud/Format.

Unless of course there is a way to query the value and use it to set a Hardware Serial port to it.
2017-11-05 10:53:54 -08:00
Kurt Eckhardt
ef59f98a5f Update Keywords 2017-11-04 20:35:52 -07:00
Kurt Eckhardt
e2eba5c00d This commit has a few different parts. It is still a WIP
This commit adds support for at least some of the Serial boards with the
CH341 chipset, tested using a board from sparkfun as well as one from
Amazon.com

The code was rearranged some of the Claim code and added a VID:DID to Serial Type table that I use to map, such that I know some of these devices have multiple valid setups.

Support Begin/End/Begin - Change baud

Added code to support switching baud rates, or more particular be able to call end() and then call begin(...) with same or different baud rate.

Hopefully some support for also releasing DTR when the end is called.

WIP - Start support for the begin(baud, format)

Adding some support to the code to handle some of the different possible format capabilities.

In particualar trying to handle the parity, number of bits and number of stop bits.

hacked up test app, such that if you type in command line like:
"#9600, 7e1"

It will extract the 9600 as the new baud and try to use format 7e1.  I only hard coded a few of these in the test app (8n1, 7e1, 7e2, 8n2)...

Again work in progress.  Took me awhile tofigure out how to do this for ch341 boards as I did not see any documents or code that handled this.  So had to deduce it from differences in USB packets.
2017-11-04 17:54:00 -07:00
Kurt Eckhardt
d381a5bf95 WIP - Add support fo CH341 Serial boards
Added support for a another Serial type CH341.

Wip - But I do have it working so far at least with a loop back test (RX shorted to TX)

Also Rearranged some of the Claim code and added a VID:DID to Serial Type table that I use to map, such that I know some of these devices have multiple valid setups.

Will test more.  I have several more cheap USB to serial adapter arriving tomorrow.
2017-11-01 16:41:54 -07:00
Paul Stoffregen
de863f4991
Merge pull request #10 from KurtE/CDCACM-Serial
Cdcacm serial
2017-10-31 16:19:22 -07:00
Kurt Eckhardt
a234bae99e Keyboard - Allow > 8 keyboard max report size
There has been at least one keyboard that does not report the report size !=8 that works...

So try to allow for any that report >=8  <=64 to work.
2017-10-31 15:40:18 -07:00
Kurt Eckhardt
e05dbaaee5 Little Cleanup - #if and comments
Removed some of the #if 1
If defs, plus

cleaned up a few comments
2017-10-31 15:11:52 -07:00
Kurt Eckhardt
704d511c81 PL2303 support
This commit should start to allow some Prolific PL2303 devices to work.
Tis device has a rather more complex initialization process than some
of the other devices.

I have tested this some with one device that I used to use to program
some older RS232 based boards plus talk to an SSC-32 device.
Test case is I am able to talk to SSC-32 and if I type in ver<cr>
It does properly return the version number.

The data I am seeing is pretty close to what
was documented in: https://gist.github.com/tommie/89011c5ac06553d5cdb8
as well as what the Linux driver outputs.

I also incorperated Frank's configuration options.
2017-10-31 11:06:12 -07:00
Paul Stoffregen
95cefd34df
Merge pull request #9 from FrankBoesing/patch-1
let user choose PERIODIC_LIST_SIZE
2017-10-30 09:25:47 -07:00
Frank
52ad568b07
let user choose PERIODIC_LIST_SIZE 2017-10-30 17:19:42 +01:00
Kurt Eckhardt
6e1f0c379c CDCACM - Serial support
Have some support in place for the CDCACM serial class code.

It appears to be working for talking to a
Teensy that is programmed USB=Serial
or USB=Serial+...

Also test with an USB2AX board which is a Servo controller for Dynamixel servos (AX-12), that is an Atmega32u2 board programmed using LUFA as the USB library.
2017-10-27 09:35:46 -07:00
PaulStoffregen
bd5f7d9486 reorganize header file 2017-10-21 11:52:26 -07:00
PaulStoffregen
8a0a5802c2 Update keywords 2017-10-21 11:40:59 -07:00