You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.4 KiB

  1. /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
  2. * Copyright 2021 Dasky (@daskygit)
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #pragma once
  18. #include "quantum.h"
  19. #include "pointing_device.h"
  20. typedef struct pimoroni_data {
  21. uint8_t left;
  22. uint8_t right;
  23. uint8_t up;
  24. uint8_t down;
  25. uint8_t click;
  26. } pimoroni_data;
  27. void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
  28. void trackball_click(bool pressed, report_mouse_t* mouse);
  29. int16_t trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale);
  30. void trackball_adapt_values(int8_t* mouse, int16_t* offset);
  31. float trackball_get_precision(void);
  32. void trackball_set_precision(float precision);
  33. bool trackball_is_scrolling(void);
  34. void trackball_set_scrolling(bool scroll);