summaryrefslogtreecommitdiffstats
path: root/keyboards/doio
diff options
context:
space:
mode:
authorLasse Luttermann <lasse.luttermann@gmail.com>2023-08-30 02:34:10 +0200
committerGitHub <noreply@github.com>2023-08-30 01:34:10 +0100
commitce51fdfe51f5935652f68fae1f12f68182be223c (patch)
treed689a53491213a9cc1a20c8b0c5702f550db42a1 /keyboards/doio
parentfbb61c3b1d4141d244049be25eeb5675d2c59428 (diff)
doio/kb16: Added timeout option for OLED boot logo. (#21823)
Diffstat (limited to 'keyboards/doio')
-rw-r--r--keyboards/doio/kb16/kb16.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/keyboards/doio/kb16/kb16.c b/keyboards/doio/kb16/kb16.c
index 34b315a87b..05f5792ea7 100644
--- a/keyboards/doio/kb16/kb16.c
+++ b/keyboards/doio/kb16/kb16.c
@@ -20,6 +20,11 @@
// OLED animation
#include "./lib/logo.h"
+// Default timeout for displaying boot logo.
+#ifndef OLED_LOGO_TIMEOUT
+ #define OLED_LOGO_TIMEOUT 5000
+#endif
+
#ifdef OLED_ENABLE
uint16_t startup_timer;
@@ -32,16 +37,14 @@
bool oled_task_kb(void) {
static bool finished_logo = false;
- if ((timer_elapsed(startup_timer) < 5000) && !finished_logo) {
+ if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
render_logo();
} else {
finished_logo = true;
-
if (!oled_task_user()) {
return false;
}
}
-
return true;
}
#endif