diff options
author | Drashna Jaelre <drashna@live.com> | 2021-12-23 16:38:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-23 16:38:53 -0800 |
commit | db149052c3067553fa357d0590ed0f9fc4460f40 (patch) | |
tree | d4124c8c58b97e49703bfc4c3a8fac32da6c803e /keyboards/pearlboards/pandora | |
parent | d563ab052e694b5fd43de6c416589877df040576 (diff) |
[Keyboard] Fix compilation issues for Pearlboards (#15562)
Diffstat (limited to 'keyboards/pearlboards/pandora')
-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 5ce5d22b06..608ee00edf 100644 --- a/keyboards/pearlboards/pandora/pandora.c +++ b/keyboards/pearlboards/pandora/pandora.c @@ -17,7 +17,11 @@ #include "pandora.h" // Encoder rotate function -bool encoder_update_user(uint8_t index, bool clockwise) { +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + return false; + } /* First encoder */ if (index == 0) { if (clockwise) { @@ -28,8 +32,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } return true; } +#endif + // Encoder click function -bool dip_switch_update_user(uint8_t index, bool active) { +#ifdef DIP_SWITCH_ENABLE +bool dip_switch_update_kb(uint8_t index, bool active) { + if (!dip_switch_update_user(index, active)) { return false; } + switch (index) { /* First encoder */ case 0: @@ -40,3 +49,4 @@ bool dip_switch_update_user(uint8_t index, bool active) { } return true; } +#endif |