tests/driver_dht: simplified Makefile
This commit is contained in:
parent
6d9d6b428a
commit
26eed54b0b
@ -3,26 +3,20 @@ include ../Makefile.tests_common
|
|||||||
|
|
||||||
FEATURES_REQUIRED = periph_gpio
|
FEATURES_REQUIRED = periph_gpio
|
||||||
|
|
||||||
# define default pin mappings for some boards:
|
|
||||||
ifneq (,$(filter stm32f4discovery,$(BOARD)))
|
|
||||||
export DHT_GPIO ?= GPIO_PIN\(4,3\)
|
|
||||||
endif
|
|
||||||
|
|
||||||
USEMODULE += dht
|
USEMODULE += dht
|
||||||
USEMODULE += xtimer
|
USEMODULE += xtimer
|
||||||
|
|
||||||
ifneq (,$(DHT_TYPE))
|
# define parameters for selected boards
|
||||||
CFLAGS += -DDHT_TYPE=$(DHT_TYPE)
|
ifneq (,$(filter stm32f4discovery,$(BOARD)))
|
||||||
else
|
DHT_GPIO ?= GPIO_PIN\(4,3\)
|
||||||
# set random default
|
|
||||||
CFLAGS += -DDHT_TYPE=DHT11
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(DHT_GPIO))
|
# set default device parameters in case they are undefined
|
||||||
|
DHT_GPIO ?= GPIO_PIN\(0,0\)
|
||||||
|
DHT_TYPE ?= DHT11
|
||||||
|
|
||||||
|
# export parameters
|
||||||
|
CFLAGS += -DDHT_TYPE=$(DHT_TYPE)
|
||||||
CFLAGS += -DDHT_GPIO=$(DHT_GPIO)
|
CFLAGS += -DDHT_GPIO=$(DHT_GPIO)
|
||||||
else
|
|
||||||
# set random default
|
|
||||||
CFLAGS += -DDHT_GPIO=GPIO_PIN\(0,0\)
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user