A fully-Android-compatible two joysticks USB driver for LPC1768. The joysticks have 1 hat, 6 buttons, and there are 1P, 2P buttons.

Dependencies:   mbed

Fork of app-board-Joystick by Chris Styles

Committer:
Alberto_Wino
Date:
Sat Dec 17 13:13:59 2016 +0000
Revision:
2:84ea6e2fb4b6
Child:
3:f1a8ec4659f8
Added 2nd-pad-as-buttons configuration.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Alberto_Wino 2:84ea6e2fb4b6 1 #pragma once
Alberto_Wino 2:84ea6e2fb4b6 2
Alberto_Wino 2:84ea6e2fb4b6 3 // Define only one of the following configurations.
Alberto_Wino 2:84ea6e2fb4b6 4
Alberto_Wino 2:84ea6e2fb4b6 5 // This configuration declares one interface, and two reports. This works well
Alberto_Wino 2:84ea6e2fb4b6 6 // with SDL, but some applications may fail to detect the second set of buttons
Alberto_Wino 2:84ea6e2fb4b6 7 // and hat.
Alberto_Wino 2:84ea6e2fb4b6 8 //#define CONFIG_TWO_REPORTS
Alberto_Wino 2:84ea6e2fb4b6 9
Alberto_Wino 2:84ea6e2fb4b6 10
Alberto_Wino 2:84ea6e2fb4b6 11 // This configuration declares one interface, one reports. The second joystick
Alberto_Wino 2:84ea6e2fb4b6 12 // is declared as four buttons instead of an extra hat. Some applications
Alberto_Wino 2:84ea6e2fb4b6 13 // fail to detect more than 16 buttons, or be confused by them.
Alberto_Wino 2:84ea6e2fb4b6 14 //#define CONFIG_2ND_PAD_AS_BUTTONS
Alberto_Wino 2:84ea6e2fb4b6 15
Alberto_Wino 2:84ea6e2fb4b6 16 #define CONFIG_TWO_INTERFACES