From 3014e8cf07b535ada9e7f28c3e13c8907f362894 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sun, 5 Nov 2017 17:15:29 +0000 Subject: [PATCH] Start the sensors process conditionally (Not all boards have sensors) --- arch/platform/srf06-cc26xx/platform.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/platform/srf06-cc26xx/platform.c b/arch/platform/srf06-cc26xx/platform.c index 4d2fca2fb..4c6b9443e 100644 --- a/arch/platform/srf06-cc26xx/platform.c +++ b/arch/platform/srf06-cc26xx/platform.c @@ -69,6 +69,7 @@ #include "button-sensor.h" #include "dev/serial-line.h" #include "net/mac/framer/frame802154.h" +#include "board-peripherals.h" #include "driverlib/driverlib_release.h" @@ -84,6 +85,12 @@ unsigned short node_id = 0; /** \brief Board specific iniatialisation */ void board_init(void); /*---------------------------------------------------------------------------*/ +#ifdef BOARD_CONF_HAS_SENSORS +#define BOARD_HAS_SENSORS BOARD_CONF_HAS_SENSORS +#else +#define BOARD_HAS_SENSORS 1 +#endif +/*---------------------------------------------------------------------------*/ static void fade(leds_mask_t l) { @@ -218,7 +225,10 @@ platform_init_stage_three() LOG_INFO(" Node ID: %d\n", node_id); +#if BOARD_HAS_SENSORS process_start(&sensors_process, NULL); +#endif + fade(LEDS_ORANGE); } /*---------------------------------------------------------------------------*/