From d3952523fe67ca22defe0d889e6fc77f76c3afd9 Mon Sep 17 00:00:00 2001 From: uqs Date: Mon, 27 Dec 2021 11:26:09 +0100 Subject: 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. --- quantum/pointing_device_drivers.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'quantum/pointing_device_drivers.c') 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 -- cgit v1.2.3