summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorDavid Hoelscher <infinityis@users.noreply.github.com>2023-09-16 23:25:14 -0500
committerGitHub <noreply@github.com>2023-09-17 14:25:14 +1000
commit169b0f33f6a0693bcf4f1c5b05a0f1ed6711d0a2 (patch)
tree219266119d1b06da50e641c7a56344317c9fe980 /quantum
parent451ac2aa1ebd4eaa5807a09a9de3c60cd390fcd3 (diff)
Lvgl rate control (#22049)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/painter/lvgl/qp_lvgl.c4
-rw-r--r--quantum/painter/lvgl/qp_lvgl.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/quantum/painter/lvgl/qp_lvgl.c b/quantum/painter/lvgl/qp_lvgl.c
index 280aeaf91f..2e433d7761 100644
--- a/quantum/painter/lvgl/qp_lvgl.c
+++ b/quantum/painter/lvgl/qp_lvgl.c
@@ -81,8 +81,8 @@ bool qp_lvgl_attach(painter_device_t device) {
lvgl_state_t *lv_task_handler_state = &lvgl_states[1];
lv_task_handler_state->fnc_id = 1;
- lv_task_handler_state->delay_ms = 5;
- lv_task_handler_state->defer_token = defer_exec_advanced(lvgl_executors, 2, 5, tick_task_callback, lv_task_handler_state);
+ lv_task_handler_state->delay_ms = QP_LVGL_TASK_PERIOD;
+ lv_task_handler_state->defer_token = defer_exec_advanced(lvgl_executors, 2, QP_LVGL_TASK_PERIOD, tick_task_callback, lv_task_handler_state);
if (lv_task_handler_state->defer_token == INVALID_DEFERRED_TOKEN) {
qp_dprintf("qp_lvgl_attach: fail (could not set up qp_lvgl executor)\n");
diff --git a/quantum/painter/lvgl/qp_lvgl.h b/quantum/painter/lvgl/qp_lvgl.h
index d9ad5e8df1..87ba3ac0a5 100644
--- a/quantum/painter/lvgl/qp_lvgl.h
+++ b/quantum/painter/lvgl/qp_lvgl.h
@@ -7,6 +7,10 @@
#include "qp.h"
#include "lvgl.h"
+#ifndef QP_LVGL_TASK_PERIOD
+# define QP_LVGL_TASK_PERIOD 5
+#endif
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter - LVGL External API