aboutsummaryrefslogtreecommitdiff
path: root/visualizer.c
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-05-15 13:00:27 +0300
committerFred Sundvik <fsundvik@gmail.com>2016-05-15 13:43:45 +0300
commit5651be7a2f50857b1ddd120a4b0184a28cdca4aa (patch)
treec9c0d92bd50eba2003ac9461476b3a801c01d7eb /visualizer.c
parentf4c11740f7bac033194ab1d5f5a52721b1d7c6d2 (diff)
downloadqmk_firmware-5651be7a2f50857b1ddd120a4b0184a28cdca4aa.tar.gz
qmk_firmware-5651be7a2f50857b1ddd120a4b0184a28cdca4aa.zip
Configurable visualizer thread priority
Diffstat (limited to 'visualizer.c')
-rw-r--r--visualizer.c8
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.
24 24
25#include "visualizer.h" 25#include "visualizer.h"
26#include "ch.h" 26#include "ch.h"
27#include "config.h"
27#include <string.h> 28#include <string.h>
28 29
29#ifdef LCD_ENABLE 30#ifdef LCD_ENABLE
@@ -47,6 +48,11 @@ SOFTWARE.
47#include "serial_link/system/driver.h" 48#include "serial_link/system/driver.h"
48#endif 49#endif
49 50
51// Define this in config.h
52#ifndef VISUALIZER_THREAD_PRIORITY
53#define "Visualizer thread priority not defined"
54#endif
55
50 56
51static visualizer_keyboard_status_t current_status = { 57static visualizer_keyboard_status_t current_status = {
52 .layer = 0xFFFFFFFF, 58 .layer = 0xFFFFFFFF,
@@ -409,7 +415,7 @@ void visualizer_init(void) {
409 // when the main thread is sleeping during the matrix scanning 415 // when the main thread is sleeping during the matrix scanning
410 chEvtObjectInit(&layer_changed_event); 416 chEvtObjectInit(&layer_changed_event);
411 (void)chThdCreateStatic(visualizerThreadStack, sizeof(visualizerThreadStack), 417 (void)chThdCreateStatic(visualizerThreadStack, sizeof(visualizerThreadStack),
412 LOWPRIO, visualizerThread, NULL); 418 VISUALIZER_THREAD_PRIORITY, visualizerThread, NULL);
413} 419}
414 420
415void update_status(bool changed) { 421void update_status(bool changed) {