diff options
author | Ryan <fauxpark@gmail.com> | 2022-04-26 08:54:34 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 08:54:34 +1000 |
commit | 645359e5d06758172fe3b6c22ad62641af56b4ad (patch) | |
tree | a81cb3731b8c472c1708b545bab913d15a601e01 /quantum/joystick.h | |
parent | 178b70f3558f51996d3a9962478cd72c5697d904 (diff) | |
download | qmk_firmware-645359e5d06758172fe3b6c22ad62641af56b4ad.tar.gz qmk_firmware-645359e5d06758172fe3b6c22ad62641af56b4ad.zip |
Joystick: Simplify report descriptor and clean up error messages (#16926)
Diffstat (limited to 'quantum/joystick.h')
-rw-r--r-- | quantum/joystick.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/quantum/joystick.h b/quantum/joystick.h index 002df3a6d9..5d81b14ef2 100644 --- a/quantum/joystick.h +++ b/quantum/joystick.h @@ -5,10 +5,18 @@ #ifndef JOYSTICK_BUTTON_COUNT # define JOYSTICK_BUTTON_COUNT 8 +#elif JOYSTICK_BUTTON_COUNT > 32 +# error Joystick feature only supports up to 32 buttons #endif #ifndef JOYSTICK_AXES_COUNT # define JOYSTICK_AXES_COUNT 4 +#elif JOYSTICK_AXES_COUNT > 6 +# error Joystick feature only supports up to 6 axes +#endif + +#if JOYSTICK_AXES_COUNT == 0 && JOYSTICK_BUTTON_COUNT == 0 +# error Joystick feature requires at least one axis or button #endif #ifndef JOYSTICK_AXES_RESOLUTION |