aboutsummaryrefslogtreecommitdiff
path: root/drivers/sensors/pmw3320.h
diff options
context:
space:
mode:
authorDasky <32983009+daskygit@users.noreply.github.com>2024-10-25 18:11:51 +0100
committerGitHub <noreply@github.com>2024-10-25 18:11:51 +0100
commitf5b495e06e257796a9be845f47bfc375fece81f8 (patch)
tree3772da6b18ad610df774269d3542c6fb660b812c /drivers/sensors/pmw3320.h
parent5c85271e48b4f2be7da47d1728ad1ddb95364ad7 (diff)
Move pointing device driver code (#24445)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'drivers/sensors/pmw3320.h')
-rw-r--r--drivers/sensors/pmw3320.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/sensors/pmw3320.h b/drivers/sensors/pmw3320.h
index a1fd546919..cfff25bd8a 100644
--- a/drivers/sensors/pmw3320.h
+++ b/drivers/sensors/pmw3320.h
@@ -21,6 +21,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include "pointing_device.h"
#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt)))
@@ -54,6 +55,8 @@ typedef struct {
int8_t dy;
} report_pmw3320_t;
+const pointing_device_driver_t pmw3320_pointing_device_driver;
+
// A bunch of functions to implement the PMW3320-specific serial protocol.
// Mostly taken from ADNS5050 driver.
// Note that the "serial.h" driver is insufficient, because it does not
@@ -69,6 +72,7 @@ void pmw3320_set_cpi(uint16_t cpi);
uint16_t pmw3320_get_cpi(void);
int8_t convert_twoscomp(uint8_t data);
bool pmw3320_check_signature(void);
+report_mouse_t pmw3320_get_report(report_mouse_t mouse_report);
#if !defined(PMW3320_CPI)
# define PMW3320_CPI 1000