A fully-Android-compatible two joysticks USB driver for LPC1768. The joysticks have 1 hat, 6 buttons, and there are 1P, 2P buttons.
Fork of app-board-Joystick by
config.h@3:f1a8ec4659f8, 2016-12-17 (annotated)
- Committer:
- Alberto_Wino
- Date:
- Sat Dec 17 15:10:12 2016 +0000
- Revision:
- 3:f1a8ec4659f8
- Parent:
- 2:84ea6e2fb4b6
Added a two-interface configuration, which fully works on Android.
Who changed what in which revision?
User | Revision | Line number | New 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 | 3:f1a8ec4659f8 | 8 | //#define CONFIG_TWO_REPORTS 1 |
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 | 3:f1a8ec4659f8 | 14 | //#define CONFIG_2ND_PAD_AS_BUTTONS 1 |
Alberto_Wino | 3:f1a8ec4659f8 | 15 | |
Alberto_Wino | 2:84ea6e2fb4b6 | 16 | |
Alberto_Wino | 3:f1a8ec4659f8 | 17 | // This configuration declares two interfaces, which should be the most |
Alberto_Wino | 3:f1a8ec4659f8 | 18 | // compatible mode. |
Alberto_Wino | 3:f1a8ec4659f8 | 19 | // Note! This is currently a bug that will make a joystick block if the other |
Alberto_Wino | 3:f1a8ec4659f8 | 20 | // joystick is moved AND not being polled. |
Alberto_Wino | 3:f1a8ec4659f8 | 21 | #define CONFIG_TWO_INTERFACES 1 |