2014-09-24 19:33:12 +02:00
|
|
|
include ../Makefile.tests_common
|
|
|
|
|
2018-05-23 12:46:42 +02:00
|
|
|
BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
|
2017-02-02 17:47:46 +01:00
|
|
|
|
2014-10-01 17:24:27 +02:00
|
|
|
FEATURES_REQUIRED = periph_gpio
|
2014-09-24 19:33:12 +02:00
|
|
|
|
2015-11-03 15:27:25 +01:00
|
|
|
USEMODULE += pir
|
|
|
|
USEMODULE += xtimer
|
|
|
|
|
|
|
|
# define parameters for selected boards
|
2014-09-24 19:33:12 +02:00
|
|
|
ifneq (,$(filter stm32f4discovery,$(BOARD)))
|
2018-06-26 22:46:37 +02:00
|
|
|
PIR_PARAM_GPIO ?= GPIO_PIN\(3,7\)
|
|
|
|
PIR_PARAM_ACTIVE_HIGH ?= 1
|
2014-09-24 19:33:12 +02:00
|
|
|
endif
|
|
|
|
ifneq (,$(filter arduino-due,$(BOARD)))
|
2018-06-26 22:46:37 +02:00
|
|
|
PIR_PARAM_GPIO ?= GPIO_PIN\(0,20\)
|
|
|
|
PIR_PARAM_ACTIVE_HIGH ?= 1
|
2014-09-24 19:33:12 +02:00
|
|
|
endif
|
|
|
|
|
2015-11-03 15:27:25 +01:00
|
|
|
# set default device parameters in case they are undefined
|
2018-06-26 22:46:37 +02:00
|
|
|
PIR_PARAM_GPIO ?= GPIO_PIN\(0,0\)
|
|
|
|
PIR_PARAM_ACTIVE_HIGH ?= 1
|
2014-09-24 19:33:12 +02:00
|
|
|
|
2015-11-03 15:27:25 +01:00
|
|
|
# export parameters
|
2018-06-26 22:46:37 +02:00
|
|
|
CFLAGS += -DPIR_PARAM_GPIO=$(PIR_PARAM_GPIO)
|
|
|
|
CFLAGS += -DPIR_PARAM_ACTIVE_HIGH=$(PIR_PARAM_ACTIVE_HIGH)
|
2014-09-24 19:33:12 +02:00
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|
|
|
|
|
|
|
|
all-polling: CFLAGS += -DTEST_PIR_POLLING
|
|
|
|
|
|
|
|
all-polling: all
|
|
|
|
|
|
|
|
all-interrupt: all
|