Skip to content

Commit

Permalink
sys/ztimer: no log for stdio_rtt/semihosting
Browse files Browse the repository at this point in the history
Both modules use ztimer for stdio, so can't call stdio based functions
before the module is initialized
  • Loading branch information
fjmolinas committed Jun 7, 2022
1 parent d20d353 commit c9fc236
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sys/ztimer/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@
#include "ztimer/periph_rtc.h"
#include "ztimer/config.h"

/* both 'stdio_rtt' and 'stdio_semihosting' rely on ztimer for stdio output,
so not output is possible before 'ztimer' has been initiated, silence all
logs */
#if IS_USED(MODULE_STDIO_RTT) || IS_USED(MODULE_STDIO_SEMIHOSTING)
#undef LOG_LEVEL
#define LOG_LEVEL LOG_NONE
#endif
#include "log.h"

#define WIDTH_TO_MAXVAL(width) (UINT32_MAX >> (32 - width))
Expand Down

0 comments on commit c9fc236

Please sign in to comment.