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.

61 lines
1.7 KiB

  1. /* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. #include "quantum.h"
  18. #include "pointing_device.h"
  19. #if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right)
  20. # include "5x6_right.h"
  21. #elif defined(KEYBOARD_handwired_tractyl_manuform_4x6_right)
  22. # include "4x6_right.h"
  23. #endif
  24. typedef union {
  25. uint32_t raw;
  26. struct {
  27. uint8_t dpi_config;
  28. };
  29. } keyboard_config_t;
  30. extern keyboard_config_t keyboard_config;
  31. enum ploopy_keycodes {
  32. DPI_CONFIG = SAFE_RANGE,
  33. KEYMAP_SAFE_RANGE,
  34. };
  35. typedef struct {
  36. uint16_t device_cpi;
  37. } kb_config_data_t;
  38. __attribute__((aligned(16))) typedef struct {
  39. int8_t x;
  40. int8_t y;
  41. } kb_mouse_report_t;
  42. extern kb_mouse_report_t sync_mouse_report;
  43. void process_mouse(void);
  44. void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y);
  45. void trackball_set_cpi(uint16_t cpi);
  46. void matrix_init_sub_kb(void);
  47. void matrix_scan_sub_kb(void);
  48. void keyboard_pre_init_sync(void);
  49. void keyboard_post_init_sync(void);
  50. void housekeeping_task_sync(void);