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.

58 lines
1.5 KiB

  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 "analog.h"
  22. #include "opt_encoder.h"
  23. // Sensor defs
  24. #define OPT_ENC1 F0
  25. #define OPT_ENC2 F4
  26. #define OPT_ENC1_MUX 0
  27. #define OPT_ENC2_MUX 4
  28. void process_wheel(report_mouse_t* mouse_report);
  29. #define LAYOUT(BL, BM, BR, BF, BB) \
  30. { {BL, BM, BR, BF, BB}, }
  31. typedef union {
  32. uint32_t raw;
  33. struct {
  34. uint8_t dpi_config;
  35. };
  36. } keyboard_config_t;
  37. extern keyboard_config_t keyboard_config;
  38. enum ploopy_keycodes {
  39. #ifdef VIA_ENABLE
  40. DPI_CONFIG = USER00,
  41. #else
  42. DPI_CONFIG = SAFE_RANGE,
  43. #endif
  44. DRAG_SCROLL,
  45. #ifdef VIA_ENABLE
  46. PLOOPY_SAFE_RANGE = SAFE_RANGE,
  47. #else
  48. PLOOPY_SAFE_RANGE,
  49. #endif
  50. };