diff --git a/arch/platform/openmote-cc2538/contiki-conf.h b/arch/platform/openmote-cc2538/contiki-conf.h index 7d808a0ba..9d87a85e5 100644 --- a/arch/platform/openmote-cc2538/contiki-conf.h +++ b/arch/platform/openmote-cc2538/contiki-conf.h @@ -173,8 +173,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 /** @} */ /*---------------------------------------------------------------------------*/ @@ -269,8 +269,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/openmote-cc2538/platform.c b/arch/platform/openmote-cc2538/platform.c index b56a65020..e2d8a0a27 100644 --- a/arch/platform/openmote-cc2538/platform.c +++ b/arch/platform/openmote-cc2538/platform.c @@ -71,17 +71,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 "OpenMote CC2538" +#define LOG_LEVEL LOG_LEVEL_MAIN /*---------------------------------------------------------------------------*/ /** * \brief Board specific iniatialisation @@ -121,17 +114,6 @@ set_rf_params(void) /* Populate linkaddr_node_addr. Maintain endianness */ memcpy(&linkaddr_node_addr, &ext_addr[8 - LINKADDR_SIZE], LINKADDR_SIZE); -#if PLATFORM_STARTUP_VERBOSE - { - int i; - printf("Contiki configured with address "); - for(i = 0; i < LINKADDR_SIZE - 1; i++) { - printf("%02x:", linkaddr_node_addr.u8[i]); - } - printf("%02x\n", linkaddr_node_addr.u8[i]); - } -#endif - NETSTACK_RADIO.set_value(RADIO_PARAM_PAN_ID, IEEE802154_PANID); NETSTACK_RADIO.set_value(RADIO_PARAM_16BIT_ADDR, short_addr); NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, CC2538_RF_CHANNEL); @@ -183,15 +165,13 @@ platform_init_stage_two() void platform_init_stage_three() { - PUTS(BOARD_STRING); + LOG_INFO(BOARD_STRING); board_init(); set_rf_params(); -#if PLATFORM_STARTUP_VERBOSE soc_print_info(); -#endif process_start(&sensors_process, NULL);