sys: printk: Fix LOG2 printk support in cpp code
This commit fixes the issue with a compilation of the sample that uses printk function from cpp code when LOG2 is used and printk is handled by logging subsystem. Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
parent
ee6b33feeb
commit
c888ceea32
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
#include <inttypes.h>
|
||||
#if defined(CONFIG_LOG_PRINTK) && defined(CONFIG_LOG2)
|
||||
#include <logging/log.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -47,7 +50,6 @@ extern "C" {
|
|||
#ifdef CONFIG_PRINTK
|
||||
|
||||
#if defined(CONFIG_LOG_PRINTK) && defined(CONFIG_LOG2)
|
||||
#include <logging/log.h>
|
||||
#define printk(...) Z_LOG_PRINTK(__VA_ARGS__)
|
||||
static inline __printf_like(1, 0) void vprintk(const char *fmt, va_list ap)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue