summaryrefslogtreecommitdiff
path: root/keyboards/pearlboards/pandora/pandora.c
diff options
context:
space:
mode:
authorKoobaczech <67293963+Koobaczech@users.noreply.github.com>2021-12-23 16:43:10 -0500
committerGitHub <noreply@github.com>2021-12-23 13:43:10 -0800
commite804e28e8e54d6821737fc32f31b7f2735a5994d (patch)
tree37132ded22bfc08dde8a5d0e936dba2bec6533c0 /keyboards/pearlboards/pandora/pandora.c
parente9d1a711b457e5f7a9af6f2feb37e4be8e84e96d (diff)
[Keyboard] Add Pearlboards boards to directory (#15005)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/pearlboards/pandora/pandora.c')
-rw-r--r--keyboards/pearlboards/pandora/pandora.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/keyboards/pearlboards/pandora/pandora.c b/keyboards/pearlboards/pandora/pandora.c
index 78368e9687..5ce5d22b06 100644
--- a/keyboards/pearlboards/pandora/pandora.c
+++ b/keyboards/pearlboards/pandora/pandora.c
@@ -15,3 +15,28 @@
*/
#include "pandora.h"
+
+// Encoder rotate function
+bool encoder_update_user(uint8_t index, bool clockwise) {
+ /* First encoder */
+ if (index == 0) {
+ if (clockwise) {
+ tap_code(KC_AUDIO_VOL_UP);
+ } else {
+ tap_code(KC_AUDIO_VOL_DOWN);
+ }
+ }
+ return true;
+}
+// Encoder click function
+bool dip_switch_update_user(uint8_t index, bool active) {
+ switch (index) {
+ /* First encoder */
+ case 0:
+ if (active) {
+ tap_code(KC_MEDIA_PLAY_PAUSE);
+ }
+ break;
+ }
+ return true;
+}