tests/driver_pir: remove redundant/double configuration from Makefile
This commit is contained in:
parent
4fcd58acfd
commit
492c86b9d7
@ -2,28 +2,7 @@ include ../Makefile.tests_common
|
||||
|
||||
BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6
|
||||
|
||||
FEATURES_REQUIRED = periph_gpio
|
||||
|
||||
USEMODULE += pir
|
||||
USEMODULE += xtimer
|
||||
|
||||
# define parameters for selected boards
|
||||
ifneq (,$(filter stm32f4discovery,$(BOARD)))
|
||||
PIR_PARAM_GPIO ?= GPIO_PIN\(3,7\)
|
||||
PIR_PARAM_ACTIVE_HIGH ?= 1
|
||||
endif
|
||||
ifneq (,$(filter arduino-due,$(BOARD)))
|
||||
PIR_PARAM_GPIO ?= GPIO_PIN\(0,20\)
|
||||
PIR_PARAM_ACTIVE_HIGH ?= 1
|
||||
endif
|
||||
|
||||
# set default device parameters in case they are undefined
|
||||
PIR_PARAM_GPIO ?= GPIO_PIN\(0,0\)
|
||||
PIR_PARAM_ACTIVE_HIGH ?= 1
|
||||
|
||||
# export parameters
|
||||
CFLAGS += -DPIR_PARAM_GPIO=$(PIR_PARAM_GPIO)
|
||||
CFLAGS += -DPIR_PARAM_ACTIVE_HIGH=$(PIR_PARAM_ACTIVE_HIGH)
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
|
||||
@ -15,12 +15,9 @@ Connect the sensor's "out" pin to a GPIO of your board that can be
|
||||
configured to create interrupts.
|
||||
Compile and flash this test application like:
|
||||
|
||||
export BOARD=your_board
|
||||
export PIR_PARAM_GPIO=name_of_your_pin
|
||||
export PIR_PARAM_ACTIVE_HIGH=if_gpio_pin_is_high_or_low_when_pir_is_active
|
||||
make clean
|
||||
make all-interrupt
|
||||
make flash
|
||||
CFLAGS="-DPIR_PARAM_GPIO=name_of_your_pin -DPIR_PARAM_ACTIVE_HIGH=if_gpio_pin_is_high_or_low_when_pir_is_active" make BOARD=your_board clean all-interrupt flash
|
||||
|
||||
Ideally, the above configuration passed via CFLAGS should be in "board.h"
|
||||
|
||||
The output should look like:
|
||||
|
||||
@ -40,12 +37,9 @@ The output should look like:
|
||||
Connect the sensor's "out" pin to any GPIO pin of you board.
|
||||
Compile and flash this test application like:
|
||||
|
||||
export BOARD=your_board
|
||||
export PIR_PARAM_GPIO=name_of_your_pin
|
||||
export PIR_PARAM_ACTIVE_HIGH=if_gpio_pin_is_high_or_low_when_pir_is_active
|
||||
make clean
|
||||
make all-polling
|
||||
make flash
|
||||
CFLAGS="-DPIR_PARAM_GPIO=name_of_your_pin -DPIR_PARAM_ACTIVE_HIGH=if_gpio_pin_is_high_or_low_when_pir_is_active" make BOARD=your_board make clean all-polling flash
|
||||
|
||||
Ideally, the above configuration passed via CFLAGS should be in "board.h"
|
||||
|
||||
The output should look like this:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user