diff --git a/tests/driver_lps331ap/Makefile b/tests/driver_lps331ap/Makefile index b590eeb18..df505e70d 100644 --- a/tests/driver_lps331ap/Makefile +++ b/tests/driver_lps331ap/Makefile @@ -6,17 +6,12 @@ FEATURES_REQUIRED = periph_i2c USEMODULE += lps331ap USEMODULE += xtimer -ifneq (,$(TEST_LPS331AP_I2C)) - CFLAGS += -DTEST_LPS331AP_I2C=$(TEST_LPS331AP_I2C) -else - # set random default - CFLAGS += -DTEST_LPS331AP_I2C=I2C_0 -endif -ifneq (,$(TEST_LPS331AP_ADDR)) - CFLAGS += -DTEST_LPS331AP_ADDR=$(TEST_LPS331AP_ADDR) -else - # set random default - CFLAGS += -DTEST_LPS331AP_ADDR=92 -endif +# set default device parameters in case they are undefined +TEST_LPS331AP_I2C ?= I2C_0 +TEST_LPS331AP_ADDR ?= 92 + +# export parameters +CFLAGS += -DTEST_LPS331AP_I2C=$(TEST_LPS331AP_I2C) +CFLAGS += -DTEST_LPS331AP_ADDR=$(TEST_LPS331AP_ADDR) include $(RIOTBASE)/Makefile.include