summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authoruqs <uqs@FreeBSD.org>2021-12-27 11:26:09 +0100
committerGitHub <noreply@github.com>2021-12-27 21:26:09 +1100
commitd3952523fe67ca22defe0d889e6fc77f76c3afd9 (patch)
treebb955e974d38a5fcaf024dc22ead48d7189153f7 /quantum
parent0709d208dbf0aa1ea39b7fa3a6938e2b3d5b5249 (diff)
pwm3360 driver cleanup and diff reduction to adns9800 (#15559)
* Diff reduction between ADNS9800 and PMW3360 drivers. They are very similar devices. This (somewhat) unreadable diff is essentially a no-op, but it makes a `vimdiff` between the 2 drivers much more readable. * Cleanup pwm3360 driver some more. Remove redundant calls to spi_start() and spi_stop(), as pmw3360_write() will already call these.
Diffstat (limited to 'quantum')
-rw-r--r--quantum/pointing_device_drivers.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/quantum/pointing_device_drivers.c b/quantum/pointing_device_drivers.c
index 0852a0bea7..260a6d2eb4 100644
--- a/quantum/pointing_device_drivers.c
+++ b/quantum/pointing_device_drivers.c
@@ -207,8 +207,7 @@ const pointing_device_driver_t pointing_device_driver = {
};
// clang-format on
#elif defined(POINTING_DEVICE_DRIVER_pmw3360)
-
-static void init(void) { pmw3360_init(); }
+static void pmw3360_device_init(void) { pmw3360_init(); }
report_mouse_t pmw3360_get_report(report_mouse_t mouse_report) {
report_pmw3360_t data = pmw3360_read_burst();
@@ -237,7 +236,7 @@ report_mouse_t pmw3360_get_report(report_mouse_t mouse_report) {
// clang-format off
const pointing_device_driver_t pointing_device_driver = {
- .init = init,
+ .init = pmw3360_device_init,
.get_report = pmw3360_get_report,
.set_cpi = pmw3360_set_cpi,
.get_cpi = pmw3360_get_cpi