Move pointing device driver code (#24445)
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
parent
5c85271e48
commit
f5b495e06e
23 changed files with 544 additions and 546 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue