Add support for joystick adc reading for stm32 MCUs. Fix joystick hid report sending for chibios

This commit is contained in:
a-chol 2020-03-29 15:43:19 +02:00
parent 34bedc3787
commit def06b4976
4 changed files with 15 additions and 11 deletions

View file

@ -1,9 +1,7 @@
#include "joystick.h"
#include "process_joystick.h"
#ifdef __AVR__
# include "analog.h"
#endif
#include "analog.h"
#include <string.h>
#include <math.h>
@ -107,7 +105,7 @@ bool process_joystick_analogread_quantum() {
wait_us(10);
# ifdef __AVR__
# if defined(__AVR__) || defined(PROTOCOL_CHIBIOS)
int16_t axis_val = analogReadPin(joystick_axes[axis_index].input_pin);
# else
// default to resting position