From 5cecc1ea1ec8df3b74d01f96336dee2c2f5c6f4e Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 29 Oct 2020 18:12:50 +1100 Subject: Add brightness level API to OLED driver (#10772) * Add brightness level API to OLED driver * Set default brightness to 255 --- keyboards/handwired/onekey/keymaps/oled/keymap.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'keyboards/handwired') 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; } -- cgit v1.2.3