From c78fbe92eeeb994e147c9ae930367b1dc189b9b1 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Tue, 3 Nov 2015 15:27:25 +0100 Subject: [PATCH] tests/driver_tcs37727: simplified Makefile --- tests/driver_tcs37727/Makefile | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/driver_tcs37727/Makefile b/tests/driver_tcs37727/Makefile index 103ef8bba3..f5254514aa 100644 --- a/tests/driver_tcs37727/Makefile +++ b/tests/driver_tcs37727/Makefile @@ -6,17 +6,12 @@ FEATURES_REQUIRED = periph_i2c USEMODULE += tcs37727 USEMODULE += xtimer -ifneq (,$(TEST_TCS37727_I2C)) - CFLAGS += -DTEST_TCS37727_I2C=$(TEST_TCS37727_I2C) -else - # set random default - CFLAGS += -DTEST_TCS37727_I2C=I2C_0 -endif -ifneq (,$(TEST_TCS37727_ADDR)) - CFLAGS += -DTEST_TCS37727_ADDR=$(TEST_TCS37727_ADDR) -else - # set random default - CFLAGS += -DTEST_TCS37727_ADDR=0x29 -endif +# set default device parameters in case they are undefined +TEST_TCS37727_I2C ?= I2C_0 +TEST_TCS37727_ADDR ?= 0x29 + +# export parameters +CFLAGS += -DTEST_TCS37727_I2C=$(TEST_TCS37727_I2C) +CFLAGS += -DTEST_TCS37727_ADDR=$(TEST_TCS37727_ADDR) include $(RIOTBASE)/Makefile.include