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
#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 */
/**

View File

@ -70,17 +70,10 @@
#include <string.h>
#include <stdio.h>
/*---------------------------------------------------------------------------*/
#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();