diff options
author | Fred Sundvik <fsundvik@gmail.com> | 2016-05-15 13:00:27 +0300 |
---|---|---|
committer | Fred Sundvik <fsundvik@gmail.com> | 2016-05-15 13:43:45 +0300 |
commit | 5651be7a2f50857b1ddd120a4b0184a28cdca4aa (patch) | |
tree | c9c0d92bd50eba2003ac9461476b3a801c01d7eb /visualizer.c | |
parent | f4c11740f7bac033194ab1d5f5a52721b1d7c6d2 (diff) | |
download | qmk_firmware-5651be7a2f50857b1ddd120a4b0184a28cdca4aa.tar.gz |
Configurable visualizer thread priority
Diffstat (limited to 'visualizer.c')
-rw-r--r-- | visualizer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/visualizer.c b/visualizer.c index 867a1d334..4c4711499 100644 --- a/visualizer.c +++ b/visualizer.c @@ -24,6 +24,7 @@ SOFTWARE. #include "visualizer.h" #include "ch.h" +#include "config.h" #include <string.h> #ifdef LCD_ENABLE @@ -47,6 +48,11 @@ SOFTWARE. #include "serial_link/system/driver.h" #endif +// Define this in config.h +#ifndef VISUALIZER_THREAD_PRIORITY +#define "Visualizer thread priority not defined" +#endif + static visualizer_keyboard_status_t current_status = { .layer = 0xFFFFFFFF, @@ -409,7 +415,7 @@ void visualizer_init(void) { // when the main thread is sleeping during the matrix scanning chEvtObjectInit(&layer_changed_event); (void)chThdCreateStatic(visualizerThreadStack, sizeof(visualizerThreadStack), - LOWPRIO, visualizerThread, NULL); + VISUALIZER_THREAD_PRIORITY, visualizerThread, NULL); } void update_status(bool changed) { |