1
0
Fork 0

Move pointing device driver code (#24445)

Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
Dasky 2024-10-25 18:11:51 +01:00 committed by GitHub
parent 5c85271e48
commit f5b495e06e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 544 additions and 546 deletions

View file

@ -77,6 +77,13 @@
#define MSB1 0x80
// clang-format on
const pointing_device_driver_t adns9800_pointing_device_driver = {
.init = adns9800_init,
.get_report = adns9800_get_report_driver,
.set_cpi = adns9800_set_cpi,
.get_cpi = adns9800_get_cpi,
};
uint16_t __attribute__((weak)) adns9800_srom_get_length(void) {
return 0;
}
@ -236,3 +243,12 @@ report_adns9800_t adns9800_get_report(void) {
return report;
}
report_mouse_t adns9800_get_report_driver(report_mouse_t mouse_report) {
report_adns9800_t sensor_report = adns9800_get_report();
mouse_report.x = CONSTRAIN_HID_XY(sensor_report.x);
mouse_report.y = CONSTRAIN_HID_XY(sensor_report.y);
return mouse_report;
}