1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

tests/driver_pcd8544: simplified Makefile

This commit is contained in:
Hauke Petersen 2015-11-03 15:27:25 +01:00
parent f9ce415d3f
commit 23c3315654

View File

@ -6,17 +6,16 @@ FEATURES_REQUIRED = periph_gpio periph_spi
USEMODULE += shell
USEMODULE += pcd8544
ifeq (,$(TEST_PCD8544_SPI))
CFLAGS += -DTEST_PCD8544_SPI=SPI_0
endif
ifeq (,$(TEST_PCD8544_CS))
CFLAGS += -DTEST_PCD8544_CS=GPIO_PIN\(0,0\)
endif
ifeq (,$(TEST_PCD8544_RESET))
CFLAGS += -DTEST_PCD8544_RESET=GPIO_PIN\(0,1\)
endif
ifeq (,$(TEST_PCD8544_MODE))
CFLAGS += -DTEST_PCD8544_MODE=GPIO_PIN\(0,2\)
endif
# set default device parameters in case they are undefined
TEST_PCD8544_SPI ?= SPI_0
TEST_PCD8544_CS ?= GPIO_PIN\(0,0\)
TEST_PCD8544_RESET ?= GPIO_PIN\(0,1\)
TEST_PCD8544_MODE ?= GPIO_PIN\(0,2\)
# export parameters
CFLAGS += -DTEST_PCD8544_SPI=$(TEST_PCD8544_SPI)
CFLAGS += -DTEST_PCD8544_CS=$(TEST_PCD8544_CS)
CFLAGS += -DTEST_PCD8544_RESET=$(TEST_PCD8544_RESET)
CFLAGS += -DTEST_PCD8544_MODE=$(TEST_PCD8544_MODE)
include $(RIOTBASE)/Makefile.include