summaryrefslogtreecommitdiffstats
path: root/quantum/pointing_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/pointing_device.h')
-rw-r--r--quantum/pointing_device.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/quantum/pointing_device.h b/quantum/pointing_device.h
index 5c0eaeaf34..a8e8e75e87 100644
--- a/quantum/pointing_device.h
+++ b/quantum/pointing_device.h
@@ -31,6 +31,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "drivers/sensors/analog_joystick.h"
#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c) || defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi)
# include "drivers/sensors/cirque_pinnacle.h"
+# include "drivers/sensors/cirque_pinnacle_gestures.h"
+# include "pointing_device_gestures.h"
#elif defined(POINTING_DEVICE_DRIVER_pimoroni_trackball)
# include "i2c_master.h"
# include "drivers/sensors/pimoroni_trackball.h"
@@ -44,12 +46,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# ifdef PIMORONI_TRACKBALL_ROTATE
# define POINTING_DEVICE_ROTATION_90
# endif
-#elif defined(POINTING_DEVICE_DRIVER_pmw3360)
+#elif defined(POINTING_DEVICE_DRIVER_pmw3360) || defined(POINTING_DEVICE_DRIVER_pmw3389)
# include "spi_master.h"
-# include "drivers/sensors/pmw3360.h"
-#elif defined(POINTING_DEVICE_DRIVER_pmw3389)
-# include "spi_master.h"
-# include "drivers/sensors/pmw3389.h"
+# include "drivers/sensors/pmw33xx_common.h"
#else
void pointing_device_driver_init(void);
report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report);
@@ -75,6 +74,16 @@ typedef enum {
POINTING_DEVICE_BUTTON8,
} pointing_device_buttons_t;
+#ifdef MOUSE_EXTENDED_REPORT
+# define XY_REPORT_MIN INT16_MIN
+# define XY_REPORT_MAX INT16_MAX
+typedef int32_t clamp_range_t;
+#else
+# define XY_REPORT_MIN INT8_MIN
+# define XY_REPORT_MAX INT8_MAX
+typedef int16_t clamp_range_t;
+#endif
+
void pointing_device_init(void);
void pointing_device_task(void);
void pointing_device_send(void);