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.
This commit is contained in:
parent
0709d208db
commit
d3952523fe
4 changed files with 133 additions and 146 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue