feat(display): Optional dedicated work queue.

* Add new Kconfig settingsx to allow selecting system or dedicated
  work queue for performing UI updates.
* Allow UI updates to not block other system tasks when display is
  updating, especially important for e-ink displays.
This commit is contained in:
Peter Johanson
2021-08-12 03:43:07 +00:00
committed by Pete Johanson
parent 9f2785786f
commit 063d98e3df
3 changed files with 60 additions and 6 deletions

View File

@@ -29,6 +29,29 @@ config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
endchoice
choice ZMK_DISPLAY_WORK_QUEUE
prompt "Work queue selection for UI updates"
config ZMK_DISPLAY_WORK_QUEUE_SYSTEM
bool "Use default system work queue for UI updates"
config ZMK_DISPLAY_WORK_QUEUE_DEDICATED
bool "Use dedicated work queue for UI updates"
endchoice
if ZMK_DISPLAY_WORK_QUEUE_DEDICATED
config ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE
int "Stack size for dedicated UI thread/queue"
default 2048
config ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY
int "Thread priority for dedicated UI thread/queue"
default 5
endif # ZMK_DISPLAY_WORK_QUEUE_DEDICATED
rsource "widgets/Kconfig"
endif