summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-07-02 14:01:44 +0000
committerQMK Bot <hello@qmk.fm>2022-07-02 14:01:44 +0000
commit3871c717da1d200e5f7e33943e4e3857d01e354d (patch)
treef3697abeb35ad449a973b7c456b6bbe6223bac04 /keyboards
parent0c74892e9080e17db637a31d421f920862baaaef (diff)
parent60ab61386e786075f0606a5a8b308d82e842f996 (diff)
downloadqmk_firmware-3871c717da1d200e5f7e33943e4e3857d01e354d.tar.gz
qmk_firmware-3871c717da1d200e5f7e33943e4e3857d01e354d.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/checkerboards/quark_squared/config.h4
-rw-r--r--keyboards/checkerboards/quark_squared/quark_squared.c12
-rw-r--r--keyboards/checkerboards/quark_squared/rules.mk2
3 files changed, 17 insertions, 1 deletions
diff --git a/keyboards/checkerboards/quark_squared/config.h b/keyboards/checkerboards/quark_squared/config.h
index 32546097f1..7331f6803d 100644
--- a/keyboards/checkerboards/quark_squared/config.h
+++ b/keyboards/checkerboards/quark_squared/config.h
@@ -53,3 +53,7 @@
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
#define RGBLIGHT_SAT_STEP 12 // units to step when in/decresing saturation
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
+
+/* define rotary encoder pins */
+#define ENCODERS_PAD_A {B0}
+#define ENCODERS_PAD_B {D1}
diff --git a/keyboards/checkerboards/quark_squared/quark_squared.c b/keyboards/checkerboards/quark_squared/quark_squared.c
index fbd7346cc0..1ead754eaf 100644
--- a/keyboards/checkerboards/quark_squared/quark_squared.c
+++ b/keyboards/checkerboards/quark_squared/quark_squared.c
@@ -15,3 +15,15 @@
*/
#include "quark_squared.h"
+
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) { return false; }
+ if (index == 0) {
+ if (clockwise) {
+ tap_code_delay(KC_VOLD, 10);
+ } else {
+ tap_code_delay(KC_VOLU, 10);
+ }
+ }
+ return true;
+}
diff --git a/keyboards/checkerboards/quark_squared/rules.mk b/keyboards/checkerboards/quark_squared/rules.mk
index d511396436..df6bcc2d31 100644
--- a/keyboards/checkerboards/quark_squared/rules.mk
+++ b/keyboards/checkerboards/quark_squared/rules.mk
@@ -17,7 +17,7 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
UNICODE_ENABLE = yes # Unicode
-
+ENCODER_ENABLE = yes # Enable Rotary Encoders
# Disable unsupported hardware
AUDIO_SUPPORTED = no
BACKLIGHT_SUPPORTED = no