aboutsummaryrefslogtreecommitdiff
path: root/keyboards/oddball/optical_sensor/optical_sensor.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/oddball/optical_sensor/optical_sensor.h')
-rw-r--r--keyboards/oddball/optical_sensor/optical_sensor.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/keyboards/oddball/optical_sensor/optical_sensor.h b/keyboards/oddball/optical_sensor/optical_sensor.h
deleted file mode 100644
index 00955209e..000000000
--- a/keyboards/oddball/optical_sensor/optical_sensor.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/* Copyright 2020 Alexander Tulloh
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
17/* common interface for opitcal sensors */
18
19#if defined ADNS_9800
20 #include "drivers/sensors/adns9800.h"
21 #define config_optical_sensor_t config_adns_t
22 #define report_optical_sensor_t report_adns_t
23 #define optical_sensor_init adns_init
24 #define optical_sensor_get_config adns_get_config
25 #define optical_sensor_set_config adns_set_config
26 #define optical_sensor_get_report adns_get_report
27#elif defined PMW_3360
28 #include "../pmw/pmw.h"
29 #define config_optical_sensor_t config_pmw_t
30 #define report_optical_sensor_t report_pmw_t
31 #define optical_sensor_init pmw_init
32 #define optical_sensor_get_config pmw_get_config
33 #define optical_sensor_set_config pmw_set_config
34 #define optical_sensor_get_report pmw_get_report
35#else
36 /* fallback stub */
37
38 #include <stdint.h>
39
40 typedef struct {
41 uint16_t cpi;
42 } config_optical_sensor_t;
43
44 typedef struct {
45 int16_t x;
46 int16_t y;
47 } report_optical_sensor_t;
48
49 #define optical_sensor_init(){ }
50 #define optical_sensor_get_config() (config_optical_sensor_t){ }
51 #define optical_sensor_set_config(config_optical_sensor_t){ }
52 #define optical_sensor_get_report() (report_optical_sensor_t){ }
53#endif