forked from mfulz_github/qmk_firmware

Allow output pin to be JS_VIRTUAL_AXIS if the axis is connected to Vcc instead of an output pin from the MCU. Fix joystick report id Fix broken v-usb hid joystick interface. Make it more resilient to unusual settings (none multiple of eight button count, 0 buttons or 0 axes) Correct adc reading for multiple axes. Piecewise range conversion for uncentered raw value range. Input, output and ground pin configuration per axis. Documentation fixes
16 lines
289 B
C
16 lines
289 B
C
#include "joystick.h"
|
|
|
|
joystick_t joystick_status = {
|
|
.buttons = {0},
|
|
.axes = {
|
|
#if JOYSTICK_AXES_COUNT>0
|
|
0
|
|
#endif
|
|
},
|
|
.status = 0
|
|
};
|
|
|
|
//array defining the reading of analog values for each axis
|
|
__attribute__ ((weak))
|
|
joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {};
|