aboutsummaryrefslogtreecommitdiff
path: root/quantum/encoder.h
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2018-10-26 16:19:23 -0400
committerDrashna Jaelre <drashna@live.com>2018-10-26 14:24:13 -0700
commit85688e5b52112c86895171d3dc8b26610480e932 (patch)
tree03f3f7bf585ebdf158576aeb6a8cf0c8c5319d6f /quantum/encoder.h
parente22c3992454ade93ccaef70ab077e79a4b2a5ef0 (diff)
downloadqmk_firmware-85688e5b52112c86895171d3dc8b26610480e932.tar.gz
qmk_firmware-85688e5b52112c86895171d3dc8b26610480e932.zip
add support for encoders to core
Diffstat (limited to 'quantum/encoder.h')
-rw-r--r--quantum/encoder.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/quantum/encoder.h b/quantum/encoder.h
new file mode 100644
index 000000000..2024fa303
--- /dev/null
+++ b/quantum/encoder.h
@@ -0,0 +1,29 @@
1/*
2 * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include "quantum.h"
21
22#define COUNTRECLOCKWISE 0
23#define CLOCKWISE 1
24
25void encoder_init(void);
26void encoder_read(void);
27
28void encoder_update_kb(int8_t index, bool clockwise);
29void encoder_update_user(int8_t index, bool clockwise);