aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-02-05 17:29:43 +0100
committerLouis Burda <quent.burda@gmail.com>2023-02-05 17:30:11 +0100
commit75991f63b5a061592d57b59a9c4f46a078d19406 (patch)
treef8122f7d557f3ed2439e50b12675b48d0de5fcdd /src/util.c
parentd19f5ce8b56e1199eb9e20ba83b38f8e3e915437 (diff)
downloadsxkbd-75991f63b5a061592d57b59a9c4f46a078d19406.tar.gz
sxkbd-75991f63b5a061592d57b59a9c4f46a078d19406.zip
Forward warning from slave to master and dont call hid and cdc tasks on slave
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 21ab2ad..c2663be 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,4 +1,6 @@
#include "util.h"
+
+#include "split.h"
#include "board.h"
#include "class/cdc/cdc_device.h"
#include "led.h"
@@ -11,7 +13,7 @@
#include <stdio.h>
-char warnlog[512];
+char warnlog[256];
int loglevel = LOG_INFO;
static void
@@ -49,6 +51,9 @@ stdio_log(int level, const char *fmtstr, ...)
va_start(cpy, fmtstr);
vsnprintf(warnlog, sizeof(warnlog), fmtstr, cpy);
va_end(cpy);
+
+ if (split_role == SLAVE)
+ split_warn_master(warnlog);
}
if (level > loglevel)