]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Configurable visualizer thread priority
authorFred Sundvik <fsundvik@gmail.com>
Sun, 15 May 2016 10:00:27 +0000 (13:00 +0300)
committerFred Sundvik <fsundvik@gmail.com>
Sun, 15 May 2016 10:43:45 +0000 (13:43 +0300)
visualizer.c

index 867a1d3347049ef6d6f2ac0023d99a35ea350a7e..4c47114990652bfa8054f4f168d5644c195d333b 100644 (file)
@@ -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) {