NCothran / chatpad-super-driver

Automatically exported from code.google.com/p/chatpad-super-driver
0 stars 0 forks source link

Wireless Controller Support #46

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Here is how to make chatpad work on a Xbox360 wireless controller:

All the data below has to be send to endpoint 1 (assuming endpoint 2, 3, 4 for 
controller 2, 3, 4). The chatpad will return data on endpoint 1, the same 
endpoint as the normal controller events.

To turn off the Xbox360 controller send: 00 00 08 C0 00 00 00 00 00 00 00 00

To enable wireless controller chatpad events, send: 00 00 0C 1B 00 00 00 00 00 
00 00 00

You will have to send alternating 1E/1F keep-alive packets (every second or so, 
I guess) to keep the chatpad events flowing: 00 00 0C 1E/1F 00 00 00 00 00 00 
00 00

After doing this, you'll start getting 00 02 00 F0 event packets (the 02 
signifying chatpad data). The same data as the wired chatpad starts appearing 
at offset 0x18.

LED activation works much the same as with the wired controller, but the 
control codes have to be send to endpoint one, the same as the init and 
keep-alive stuff:

00 00 0C  8 00 00 00 00 00 00 00 00 capslock
00 00 0C  9 00 00 00 00 00 00 00 00 square
00 00 0C  a 00 00 00 00 00 00 00 00 circle
00 00 0C  b 00 00 00 00 00 00 00 00 people
00 00 0C  c 00 00 00 00 00 00 00 00 backlight
00 00 0C 11 00 00 00 00 00 00 00 00 capslock
00 00 0C 12 00 00 00 00 00 00 00 00 square
00 00 0C 13 00 00 00 00 00 00 00 00 square and capslock
00 00 0C 14 00 00 00 00 00 00 00 00 circle
00 00 0C 15 00 00 00 00 00 00 00 00 capslock and circle
00 00 0C 16 00 00 00 00 00 00 00 00 circle, square
00 00 0C 17 00 00 00 00 00 00 00 00 circle, square, capslock
00 00 0C 1b 00 00 00 00 00 00 00 00 makes backlight led go on on keypress

Original issue reported on code.google.com by grum...@gmail.com on 1 Jan 2013 at 8:24