diff options
Diffstat (limited to 'keyboards/ploopyco/trackball_mini/trackball_mini.h')
| -rw-r--r-- | keyboards/ploopyco/trackball_mini/trackball_mini.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.h b/keyboards/ploopyco/trackball_mini/trackball_mini.h new file mode 100644 index 000000000..b9754cbc7 --- /dev/null +++ b/keyboards/ploopyco/trackball_mini/trackball_mini.h | |||
| @@ -0,0 +1,54 @@ | |||
| 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 | |||
| 20 | #pragma once | ||
| 21 | |||
| 22 | #include "quantum.h" | ||
| 23 | #include "adns5050.h" | ||
| 24 | #include "analog.h" | ||
| 25 | #include "opt_encoder.h" | ||
| 26 | #include "pointing_device.h" | ||
| 27 | |||
| 28 | // Sensor defs | ||
| 29 | #define OPT_ENC1 F0 | ||
| 30 | #define OPT_ENC2 F4 | ||
| 31 | #define OPT_ENC1_MUX 0 | ||
| 32 | #define OPT_ENC2_MUX 4 | ||
| 33 | |||
| 34 | void process_mouse(report_mouse_t* mouse_report); | ||
| 35 | void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); | ||
| 36 | void process_wheel(report_mouse_t* mouse_report); | ||
| 37 | void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); | ||
| 38 | |||
| 39 | #define LAYOUT(BL, BM, BR, BF, BB) \ | ||
| 40 | { {BL, BM, BR, BF, BB}, } | ||
| 41 | |||
| 42 | typedef union { | ||
| 43 | uint32_t raw; | ||
| 44 | struct { | ||
| 45 | uint8_t dpi_config; | ||
| 46 | }; | ||
| 47 | } keyboard_config_t; | ||
| 48 | |||
| 49 | extern keyboard_config_t keyboard_config; | ||
| 50 | |||
| 51 | enum ploopy_keycodes { | ||
| 52 | DPI_CONFIG = SAFE_RANGE, | ||
| 53 | PLOOPY_SAFE_RANGE, | ||
| 54 | }; | ||
