diff options
Diffstat (limited to 'keyboards/pearlboards/pandora/pandora.c')
| -rw-r--r-- | keyboards/pearlboards/pandora/pandora.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/keyboards/pearlboards/pandora/pandora.c b/keyboards/pearlboards/pandora/pandora.c index 5ce5d22b0..608ee00ed 100644 --- a/keyboards/pearlboards/pandora/pandora.c +++ b/keyboards/pearlboards/pandora/pandora.c | |||
| @@ -17,7 +17,11 @@ | |||
| 17 | #include "pandora.h" | 17 | #include "pandora.h" |
| 18 | 18 | ||
| 19 | // Encoder rotate function | 19 | // Encoder rotate function |
| 20 | bool encoder_update_user(uint8_t index, bool clockwise) { | 20 | #ifdef ENCODER_ENABLE |
| 21 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 22 | if (!encoder_update_user(index, clockwise)) { | ||
| 23 | return false; | ||
| 24 | } | ||
| 21 | /* First encoder */ | 25 | /* First encoder */ |
| 22 | if (index == 0) { | 26 | if (index == 0) { |
| 23 | if (clockwise) { | 27 | if (clockwise) { |
| @@ -28,8 +32,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 28 | } | 32 | } |
| 29 | return true; | 33 | return true; |
| 30 | } | 34 | } |
| 35 | #endif | ||
| 36 | |||
| 31 | // Encoder click function | 37 | // Encoder click function |
| 32 | bool dip_switch_update_user(uint8_t index, bool active) { | 38 | #ifdef DIP_SWITCH_ENABLE |
| 39 | bool dip_switch_update_kb(uint8_t index, bool active) { | ||
| 40 | if (!dip_switch_update_user(index, active)) { return false; } | ||
| 41 | |||
| 33 | switch (index) { | 42 | switch (index) { |
| 34 | /* First encoder */ | 43 | /* First encoder */ |
| 35 | case 0: | 44 | case 0: |
| @@ -40,3 +49,4 @@ bool dip_switch_update_user(uint8_t index, bool active) { | |||
| 40 | } | 49 | } |
| 41 | return true; | 50 | return true; |
| 42 | } | 51 | } |
| 52 | #endif | ||
