diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-02-05 17:29:43 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-02-05 17:30:11 +0100 |
| commit | 75991f63b5a061592d57b59a9c4f46a078d19406 (patch) | |
| tree | f8122f7d557f3ed2439e50b12675b48d0de5fcdd /src/util.c | |
| parent | d19f5ce8b56e1199eb9e20ba83b38f8e3e915437 (diff) | |
| download | sxkbd-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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |
