diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c index ea3606b33ea..ebe29901788 100644 --- a/drivers/syslog/syslog_channel.c +++ b/drivers/syslog/syslog_channel.c @@ -47,6 +47,8 @@ #ifdef CONFIG_RAMLOG_SYSLOG # include +#elif defined(CONFIG_SYSLOG_RPMSG) +# include #elif defined(CONFIG_ARCH_LOWPUTC) # include #endif @@ -59,7 +61,7 @@ #if defined(CONFIG_ARCH_LOWPUTC) # define HAVE_LOWPUTC -#elif !defined(CONFIG_RAMLOG_SYSLOG) +#elif !defined(CONFIG_RAMLOG_SYSLOG) && !defined(CONFIG_SYSLOG_RPMSG) # define NEED_LOWPUTC #endif @@ -83,6 +85,13 @@ const struct syslog_channel_s g_default_channel = ramlog_putc, syslog_default_flush }; +#elif defined(CONFIG_SYSLOG_RPMSG) +const struct syslog_channel_s g_default_channel = +{ + syslog_rpmsg_putc, + syslog_rpmsg_putc, + syslog_default_flush +}; #elif defined(HAVE_LOWPUTC) const struct syslog_channel_s g_default_channel = { diff --git a/drivers/syslog/syslog_rpmsg.c b/drivers/syslog/syslog_rpmsg.c index 6f6a157a0cc..7ac43d2b753 100644 --- a/drivers/syslog/syslog_rpmsg.c +++ b/drivers/syslog/syslog_rpmsg.c @@ -44,7 +44,6 @@ #include #include -#include #include #include #include @@ -347,7 +346,7 @@ static int syslog_rpmsg_ept_cb(FAR struct rpmsg_endpoint *ept, FAR void *data, * Public Functions ****************************************************************************/ -int up_putc(int ch) +int syslog_rpmsg_putc(int ch) { FAR struct syslog_rpmsg_s *priv = &g_syslog_rpmsg; irqstate_t flags; diff --git a/include/nuttx/syslog/syslog_rpmsg.h b/include/nuttx/syslog/syslog_rpmsg.h index 8d8f2c4379d..33ec670f026 100644 --- a/include/nuttx/syslog/syslog_rpmsg.h +++ b/include/nuttx/syslog/syslog_rpmsg.h @@ -59,6 +59,7 @@ extern "C" int syslog_rpmsg_init_early(FAR const char *cpu_name, FAR void *buffer, size_t size); int syslog_rpmsg_init(void); +int syslog_rpmsg_putc(int ch); #endif #ifdef CONFIG_SYSLOG_RPMSG_SERVER