diff options
author | Ryan <fauxpark@gmail.com> | 2020-10-29 18:12:50 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 00:12:50 -0700 |
commit | 5cecc1ea1ec8df3b74d01f96336dee2c2f5c6f4e (patch) | |
tree | c5abcb14e22e0a9ce2476162208b45bcf6a6d77a /keyboards/handwired/onekey | |
parent | b9ed9d33d3b57627e919e771f62ff1cbecf0c8d4 (diff) |
Add brightness level API to OLED driver (#10772)
* Add brightness level API to OLED driver
* Set default brightness to 255
Diffstat (limited to 'keyboards/handwired/onekey')
-rw-r--r-- | keyboards/handwired/onekey/keymaps/oled/keymap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/keyboards/handwired/onekey/keymaps/oled/keymap.c b/keyboards/handwired/onekey/keymaps/oled/keymap.c index b6e66ace74..1c120d01c1 100644 --- a/keyboards/handwired/onekey/keymaps/oled/keymap.c +++ b/keyboards/handwired/onekey/keymaps/oled/keymap.c @@ -144,6 +144,12 @@ static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { } } break; + case 4: + if (!state->pressed) { + // quadruple tap - step through brightness levels + oled_set_brightness(oled_get_brightness() + 0x10); + } + break; default: break; } |