From 75991f63b5a061592d57b59a9c4f46a078d19406 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Sun, 5 Feb 2023 17:29:43 +0100 Subject: Forward warning from slave to master and dont call hid and cdc tasks on slave --- src/util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/util.c') 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 -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) -- cgit v1.2.3-71-gd317