Use the logging module (Zoul)

This commit is contained in:
George Oikonomou 2017-10-18 00:17:23 +01:00 committed by George Oikonomou
parent fec382602b
commit 248db78214
2 changed files with 9 additions and 16 deletions

View File

@ -171,8 +171,8 @@ typedef uint32_t rtimer_clock_t;
* *
* @{ * @{
*/ */
#ifndef PLATFORM_CONF_STARTUP_VERBOSE #ifndef LOG_CONF_LEVEL_MAIN
#define PLATFORM_CONF_STARTUP_VERBOSE 1 /**< Set to 0 to decrease startup verbosity */ #define LOG_CONF_LEVEL_MAIN LOG_LEVEL_NONE /**< Set to 0 to decrease startup verbosity */
#endif #endif
/** @} */ /** @} */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -267,8 +267,8 @@ typedef uint32_t rtimer_clock_t;
#undef UART_CONF_ENABLE #undef UART_CONF_ENABLE
#define UART_CONF_ENABLE 0 #define UART_CONF_ENABLE 0
#undef PLATFORM_CONF_STARTUP_VERBOSE #undef LOG_CONF_LEVEL_MAIN
#define PLATFORM_CONF_STARTUP_VERBOSE 0 #define LOG_CONF_LEVEL_MAIN LOG_LEVEL_NONE
#endif /* CC2538_CONF_QUIET */ #endif /* CC2538_CONF_QUIET */
/** /**

View File

@ -70,17 +70,10 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#if PLATFORM_STARTUP_VERBOSE /* Log configuration */
#define PRINTF(...) printf(__VA_ARGS__) #include "sys/log.h"
#else #define LOG_MODULE "Zoul"
#define PRINTF(...) #define LOG_LEVEL LOG_LEVEL_MAIN
#endif
#if UART_CONF_ENABLE
#define PUTS(s) puts(s)
#else
#define PUTS(s)
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/** /**
* \brief Board specific iniatialisation * \brief Board specific iniatialisation
@ -246,7 +239,7 @@ platform_init_stage_two()
void void
platform_init_stage_three() platform_init_stage_three()
{ {
PUTS(BOARD_STRING); LOG_INFO(BOARD_STRING);
board_init(); board_init();