diff options
author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2020-12-26 02:38:07 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-26 02:38:07 +0900 |
commit | 5544bf8524c77ad09d32cf2b0f6dc40f7b05ee01 (patch) | |
tree | 88774de1c64e4c9a37beeefe6a8025805aed0c83 /keyboards/helix/rev2/keymaps/five_rows/oled_display.c | |
parent | 7ca4b619223260d17bcc0d065a02d1bbdce436b8 (diff) |
[Keymap] update rules.mk and config.h of `helix/rev2:five_rows` (#11302)
* update keyboards/helix/rev2/keymaps/five_rows/rules.mk: oled selection, led animation selection
* add OLED_UPDATE_INTERVAL support into keyboards/helix/rev2/keymaps/five_rows/oled_display.c
Support for OLED_UPDATE_INTERVAL, even for older types of OLED tasks.
* Add 'HELIX=debug/no-debug' option into 'helix/rev2/keymaps/five_rows/rules.mk'
Diffstat (limited to 'keyboards/helix/rev2/keymaps/five_rows/oled_display.c')
-rw-r--r-- | keyboards/helix/rev2/keymaps/five_rows/oled_display.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/keyboards/helix/rev2/keymaps/five_rows/oled_display.c b/keyboards/helix/rev2/keymaps/five_rows/oled_display.c index 127d80cc7d..689efe4c88 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/oled_display.c +++ b/keyboards/helix/rev2/keymaps/five_rows/oled_display.c @@ -163,6 +163,10 @@ void render_status(void) { } # ifdef SSD1306OLED +# if OLED_UPDATE_INTERVAL > 0 +uint16_t oled_update_timeout; +# endif + void iota_gfx_task_user(void) { struct CharacterMatrix matrix; @@ -172,6 +176,12 @@ void iota_gfx_task_user(void) { } # endif +#if OLED_UPDATE_INTERVAL > 0 + if (timer_elapsed(oled_update_timeout) < OLED_UPDATE_INTERVAL) { + return; + } + oled_update_timeout = timer_read(); +#endif matrix_clear(&matrix); if (is_keyboard_master()) { render_status(&matrix); |