From 7f7364c55912879baaff8fafca550d02f17b4d44 Mon Sep 17 00:00:00 2001 From: Dasky <32983009+daskygit@users.noreply.github.com> Date: Mon, 27 Dec 2021 01:05:51 +0000 Subject: [Core] Split support for pointing devices. (#15304) * Draft implementation * formatting * fix combined buttons * remove pimoroni throttle * sync pointing on a throttle loop with checksum * no longer used * doh Co-authored-by: Drashna Jaelre * switch pimoroni to a cpi equivalent * add cpi support * allow user modification of seperate mouse reports * a little tidy up * add *_RIGHT defines. * docs * doxygen comments * basic changelog * clean up pimoroni * small doc fixes * Update docs/feature_pointing_device.md Co-authored-by: Drashna Jaelre * performance tweak if side has usb * Don't run init funtions on wrong side * renamed some variables for consistency * fix pimoroni typos * Clamp instead of OR * Promote combined values to uint16_t * Update pointing_device.c Co-authored-by: Drashna Jaelre Co-authored-by: Nick Brassel --- drivers/sensors/pimoroni_trackball.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers/sensors/pimoroni_trackball.h') diff --git a/drivers/sensors/pimoroni_trackball.h b/drivers/sensors/pimoroni_trackball.h index 59ee8724ba..e20ee748a7 100644 --- a/drivers/sensors/pimoroni_trackball.h +++ b/drivers/sensors/pimoroni_trackball.h @@ -23,9 +23,6 @@ #ifndef PIMORONI_TRACKBALL_ADDRESS # define PIMORONI_TRACKBALL_ADDRESS 0x0A #endif -#ifndef PIMORONI_TRACKBALL_INTERVAL_MS -# define PIMORONI_TRACKBALL_INTERVAL_MS 8 -#endif #ifndef PIMORONI_TRACKBALL_SCALE # define PIMORONI_TRACKBALL_SCALE 5 #endif @@ -52,10 +49,10 @@ typedef struct { uint8_t click; } pimoroni_data_t; -void pimironi_trackball_device_init(void); +void pimoroni_trackball_device_init(void); void pimoroni_trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale); void pimoroni_trackball_adapt_values(int8_t* mouse, int16_t* offset); -float pimoroni_trackball_get_precision(void); -void pimoroni_trackball_set_precision(float precision); +uint16_t pimoroni_trackball_get_cpi(void); +void pimoroni_trackball_set_cpi(uint16_t cpi); i2c_status_t read_pimoroni_trackball(pimoroni_data_t* data); -- cgit v1.2.3