From 248db782148c60ddac2f88fed287ebf72615e6f1 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Wed, 18 Oct 2017 00:17:23 +0100 Subject: [PATCH] Use the logging module (Zoul) --- arch/platform/zoul/contiki-conf.h | 8 ++++---- arch/platform/zoul/platform.c | 17 +++++------------ 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/arch/platform/zoul/contiki-conf.h b/arch/platform/zoul/contiki-conf.h index ca01da3fc..5f9586049 100644 --- a/arch/platform/zoul/contiki-conf.h +++ b/arch/platform/zoul/contiki-conf.h @@ -171,8 +171,8 @@ typedef uint32_t rtimer_clock_t; * * @{ */ -#ifndef PLATFORM_CONF_STARTUP_VERBOSE -#define PLATFORM_CONF_STARTUP_VERBOSE 1 /**< Set to 0 to decrease startup verbosity */ +#ifndef LOG_CONF_LEVEL_MAIN +#define LOG_CONF_LEVEL_MAIN LOG_LEVEL_NONE /**< Set to 0 to decrease startup verbosity */ #endif /** @} */ /*---------------------------------------------------------------------------*/ @@ -267,8 +267,8 @@ typedef uint32_t rtimer_clock_t; #undef UART_CONF_ENABLE #define UART_CONF_ENABLE 0 -#undef PLATFORM_CONF_STARTUP_VERBOSE -#define PLATFORM_CONF_STARTUP_VERBOSE 0 +#undef LOG_CONF_LEVEL_MAIN +#define LOG_CONF_LEVEL_MAIN LOG_LEVEL_NONE #endif /* CC2538_CONF_QUIET */ /** diff --git a/arch/platform/zoul/platform.c b/arch/platform/zoul/platform.c index 4d0283240..83085e06e 100644 --- a/arch/platform/zoul/platform.c +++ b/arch/platform/zoul/platform.c @@ -70,17 +70,10 @@ #include #include /*---------------------------------------------------------------------------*/ -#if PLATFORM_STARTUP_VERBOSE -#define PRINTF(...) printf(__VA_ARGS__) -#else -#define PRINTF(...) -#endif - -#if UART_CONF_ENABLE -#define PUTS(s) puts(s) -#else -#define PUTS(s) -#endif +/* Log configuration */ +#include "sys/log.h" +#define LOG_MODULE "Zoul" +#define LOG_LEVEL LOG_LEVEL_MAIN /*---------------------------------------------------------------------------*/ /** * \brief Board specific iniatialisation @@ -246,7 +239,7 @@ platform_init_stage_two() void platform_init_stage_three() { - PUTS(BOARD_STRING); + LOG_INFO(BOARD_STRING); board_init();