summaryrefslogtreecommitdiffstats
path: root/drivers/sensors/pimoroni_trackball.c
diff options
context:
space:
mode:
authorjack <0x6A73@pm.me>2022-06-09 11:09:00 -0600
committerGitHub <noreply@github.com>2022-06-09 10:09:00 -0700
commitd2abfaeacdd4d35b8b3dca8487f0f0149fe33aa3 (patch)
treecbb7d2faa4ab8d4b93e052627721ccf13ed1ba6f /drivers/sensors/pimoroni_trackball.c
parent0ab51ee29d6e980a50b27f122a10d0f7de4b1aed (diff)
Fixup Pimoroni trackball code (#17335)
Diffstat (limited to 'drivers/sensors/pimoroni_trackball.c')
-rw-r--r--drivers/sensors/pimoroni_trackball.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/sensors/pimoroni_trackball.c b/drivers/sensors/pimoroni_trackball.c
index 333e017a06..88a351316b 100644
--- a/drivers/sensors/pimoroni_trackball.c
+++ b/drivers/sensors/pimoroni_trackball.c
@@ -95,16 +95,3 @@ int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_di
uint16_t magnitude = (scale * offset * offset * precision) >> 7;
return isnegative ? -(int16_t)(magnitude) : (int16_t)(magnitude);
}
-
-void pimoroni_trackball_adapt_values(int8_t* mouse, int16_t* offset) {
- if (*offset > 127) {
- *mouse = 127;
- *offset -= 127;
- } else if (*offset < -127) {
- *mouse = -127;
- *offset += 127;
- } else {
- *mouse = *offset;
- *offset = 0;
- }
-}