trackball_nano.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Copyright 2021 Colin Lam (Ploopy Corporation)
  2. * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
  3. * Copyright 2019 Sunjun Kim
  4. * Copyright 2019 Hiroyuki Okada
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #pragma once
  20. #include "quantum.h"
  21. #include "adns5050.h"
  22. #include "analog.h"
  23. #include "opt_encoder.h"
  24. #include "pointing_device.h"
  25. // Sensor defs
  26. #define OPT_ENC1 F0
  27. #define OPT_ENC2 F4
  28. #define OPT_ENC1_MUX 0
  29. #define OPT_ENC2_MUX 4
  30. void process_mouse(report_mouse_t* mouse_report);
  31. void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y);
  32. #define LAYOUT(k00) {{ KC_NO }}
  33. typedef union {
  34. uint32_t raw;
  35. struct {
  36. uint8_t dpi_config;
  37. };
  38. } keyboard_config_t;
  39. extern keyboard_config_t keyboard_config;
  40. enum ploopy_keycodes {
  41. DPI_CONFIG = SAFE_RANGE,
  42. PLOOPY_SAFE_RANGE,
  43. };