2016-07-31 13:04:05 +02:00
|
|
|
[vid=0x081F,pid=0xE401] // here we need to provide the vid/pid of the controller
|
|
|
|
//At first we set the dpad mode. This controller uses 2 bytes. One byte is for up(0x00)/down(0xFF) and the other for left(0x00)/right(0xFF).
|
|
|
|
DPAD_MODE = DPAD_Absolute_2Values
|
|
|
|
|
|
|
|
// byte-position / value
|
|
|
|
|
|
|
|
//Set dpad values. The values you need to set depend on the dpad mode.
|
|
|
|
VPAD_BUTTON_DPAD_ABS_UP = 0x01, 0x00
|
|
|
|
VPAD_BUTTON_DPAD_ABS_DOWN = 0x01, 0xFF
|
|
|
|
VPAD_BUTTON_DPAD_ABS_LEFT = 0x00, 0x00
|
|
|
|
VPAD_BUTTON_DPAD_ABS_RIGHT = 0x00, 0xFF
|
|
|
|
|
|
|
|
//Set normal buttons
|
|
|
|
VPAD_BUTTON_A = 0x05, 0x20
|
|
|
|
VPAD_BUTTON_B = 0x05, 0x40
|
|
|
|
VPAD_BUTTON_X = 0x05, 0x10
|
|
|
|
VPAD_BUTTON_Y = 0x05, 0x80
|
|
|
|
VPAD_BUTTON_MINUS = 0x06, 0x10
|
|
|
|
VPAD_BUTTON_PLUS = 0x06, 0x20
|
|
|
|
|
|
|
|
//We only have 1 trigger on each side, lets always trigger both.
|
|
|
|
VPAD_BUTTON_R = 0x06, 0x02
|
|
|
|
VPAD_BUTTON_ZR = 0x06, 0x02
|
|
|
|
VPAD_BUTTON_L = 0x06, 0x01
|
2017-04-23 15:02:40 +02:00
|
|
|
VPAD_BUTTON_ZL = 0x06, 0x01
|
|
|
|
PAD_COUNT=1
|