From 492c86b9d79eb3536d3b794f0414ff885cf3b7a8 Mon Sep 17 00:00:00 2001 From: Hyungsin <hskim@berkeley.edu> Date: Tue, 3 Jul 2018 11:06:57 -0700 Subject: [PATCH] tests/driver_pir: remove redundant/double configuration from Makefile --- tests/driver_pir/Makefile | 21 --------------------- tests/driver_pir/README.md | 18 ++++++------------ 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/tests/driver_pir/Makefile b/tests/driver_pir/Makefile index 47ddf2c560..a509648dcc 100644 --- a/tests/driver_pir/Makefile +++ b/tests/driver_pir/Makefile @@ -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 diff --git a/tests/driver_pir/README.md b/tests/driver_pir/README.md index 6121fb7a82..0a6c802fcc 100644 --- a/tests/driver_pir/README.md +++ b/tests/driver_pir/README.md @@ -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: -- GitLab