forked from kofal.net/zmk
refactor: use low priority workqueue for underglow and battery reporting
Blocking operations on the high priority system workqueue may result in deadlocks, particularly when Bluetooth is in use.
This commit is contained in:
committed by
Pete Johanson
parent
f743d57ff1
commit
9a963abfc8
@@ -24,6 +24,7 @@
|
||||
#include <zmk/event_manager.h>
|
||||
#include <zmk/events/activity_state_changed.h>
|
||||
#include <zmk/events/usb_conn_state_changed.h>
|
||||
#include <zmk/workqueue.h>
|
||||
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
@@ -203,7 +204,7 @@ static void zmk_rgb_underglow_tick_handler(struct k_timer *timer) {
|
||||
return;
|
||||
}
|
||||
|
||||
k_work_submit(&underglow_work);
|
||||
k_work_submit_to_queue(zmk_workqueue_lowprio_work_q(), &underglow_work);
|
||||
}
|
||||
|
||||
K_TIMER_DEFINE(underglow_tick, zmk_rgb_underglow_tick_handler, NULL);
|
||||
|
||||
Reference in New Issue
Block a user