diff options
author | Dasky <32983009+daskygit@users.noreply.github.com> | 2024-10-25 18:11:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-25 18:11:51 +0100 |
commit | f5b495e06e257796a9be845f47bfc375fece81f8 (patch) | |
tree | 3772da6b18ad610df774269d3542c6fb660b812c /drivers/sensors/pmw33xx_common.h | |
parent | 5c85271e48b4f2be7da47d1728ad1ddb95364ad7 (diff) |
Move pointing device driver code (#24445)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'drivers/sensors/pmw33xx_common.h')
-rw-r--r-- | drivers/sensors/pmw33xx_common.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/sensors/pmw33xx_common.h b/drivers/sensors/pmw33xx_common.h index b30ee3d596..22e35c3327 100644 --- a/drivers/sensors/pmw33xx_common.h +++ b/drivers/sensors/pmw33xx_common.h @@ -14,6 +14,7 @@ #include <stdint.h> #include "spi_master.h" #include "util.h" +#include "pointing_device.h" #if defined(POINTING_DEVICE_DRIVER_pmw3360) # include "pmw3360.h" @@ -102,6 +103,10 @@ _Static_assert(sizeof((pmw33xx_report_t){0}.motion) == 1, "pmw33xx_report_t.moti #define CONSTRAIN(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) +#define pmw3360_pointing_device_driver pmw33xx_pointing_device_driver; +#define pmw3389_pointing_device_driver pmw33xx_pointing_device_driver; +const pointing_device_driver_t pmw33xx_pointing_device_driver; + /** * @brief Initializes the given sensor so it is in a working state and ready to * be polled for data. @@ -170,3 +175,8 @@ uint8_t pmw33xx_read(uint8_t sensor, uint8_t reg_addr); * @return false Write failed, do not proceed operation */ bool pmw33xx_write(uint8_t sensor, uint8_t reg_addr, uint8_t data); + +void pmw33xx_init_wrapper(void); +void pmw33xx_set_cpi_wrapper(uint16_t cpi); +uint16_t pmw33xx_get_cpi_wrapper(void); +report_mouse_t pmw33xx_get_report(report_mouse_t mouse_report); |