diff options
| author | Dasky <32983009+daskygit@users.noreply.github.com> | 2024-10-25 18:11:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-25 18:11:51 +0100 |
| commit | f5b495e06e257796a9be845f47bfc375fece81f8 (patch) | |
| tree | 3772da6b18ad610df774269d3542c6fb660b812c /quantum/split_common | |
| parent | 5c85271e48b4f2be7da47d1728ad1ddb95364ad7 (diff) | |
Move pointing device driver code (#24445)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'quantum/split_common')
| -rw-r--r-- | quantum/split_common/transactions.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c index 6c1aeb284d..f66b2ad89f 100644 --- a/quantum/split_common/transactions.c +++ b/quantum/split_common/transactions.c | |||
| @@ -733,7 +733,7 @@ static bool pointing_handlers_master(matrix_row_t master_matrix[], matrix_row_t | |||
| 733 | return okay; | 733 | return okay; |
| 734 | } | 734 | } |
| 735 | 735 | ||
| 736 | extern const pointing_device_driver_t pointing_device_driver; | 736 | extern const pointing_device_driver_t *pointing_device_driver; |
| 737 | 737 | ||
| 738 | static void pointing_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { | 738 | static void pointing_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { |
| 739 | # if defined(POINTING_DEVICE_LEFT) | 739 | # if defined(POINTING_DEVICE_LEFT) |
| @@ -753,18 +753,18 @@ static void pointing_handlers_slave(matrix_row_t master_matrix[], matrix_row_t s | |||
| 753 | last_exec = timer_read32(); | 753 | last_exec = timer_read32(); |
| 754 | # endif | 754 | # endif |
| 755 | 755 | ||
| 756 | uint16_t temp_cpi = !pointing_device_driver.get_cpi ? 0 : pointing_device_driver.get_cpi(); // check for NULL | 756 | uint16_t temp_cpi = !pointing_device_driver->get_cpi ? 0 : pointing_device_driver->get_cpi(); // check for NULL |
| 757 | 757 | ||
| 758 | split_shared_memory_lock(); | 758 | split_shared_memory_lock(); |
| 759 | split_slave_pointing_sync_t pointing; | 759 | split_slave_pointing_sync_t pointing; |
| 760 | memcpy(&pointing, &split_shmem->pointing, sizeof(split_slave_pointing_sync_t)); | 760 | memcpy(&pointing, &split_shmem->pointing, sizeof(split_slave_pointing_sync_t)); |
| 761 | split_shared_memory_unlock(); | 761 | split_shared_memory_unlock(); |
| 762 | 762 | ||
| 763 | if (pointing.cpi && pointing.cpi != temp_cpi && pointing_device_driver.set_cpi) { | 763 | if (pointing.cpi && pointing.cpi != temp_cpi && pointing_device_driver->set_cpi) { |
| 764 | pointing_device_driver.set_cpi(pointing.cpi); | 764 | pointing_device_driver->set_cpi(pointing.cpi); |
| 765 | } | 765 | } |
| 766 | 766 | ||
| 767 | pointing.report = pointing_device_driver.get_report((report_mouse_t){0}); | 767 | pointing.report = pointing_device_driver->get_report((report_mouse_t){0}); |
| 768 | // Now update the checksum given that the pointing has been written to | 768 | // Now update the checksum given that the pointing has been written to |
| 769 | pointing.checksum = crc8(&pointing.report, sizeof(report_mouse_t)); | 769 | pointing.checksum = crc8(&pointing.report, sizeof(report_mouse_t)); |
| 770 | 770 | ||
