From 4065d4f5d506d7a0e562e98b06d2afd01e529df6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel <daniel.friesel@uos.de> Date: Fri, 10 Jul 2020 14:53:45 +0200 Subject: add resistive load driver for energy measurement device evaluation --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d008049..5608e8f 100644 --- a/Makefile +++ b/Makefile @@ -130,6 +130,19 @@ ifneq ($(findstring sharp96,${drivers}), ) COMMON_FLAGS += -DSHARP96_CS_PIN=GPIO::${sharp96_cs_pin} endif +ifneq ($(findstring resistive_load,${drivers}), ) + CXX_TARGETS += src/driver/resistive_load.cc + resistor1_pin ?= p3_0 + resistor2_pin ?= p3_1 + resistor3_pin ?= p3_2 + resistor4_pin ?= p3_4 + COMMON_FLAGS += -DDRIVER_RESISTIVE_LOAD + COMMON_FLAGS += -DRESISTIVE_LOAD_PIN1=GPIO::${resistor1_pin} + COMMON_FLAGS += -DRESISTIVE_LOAD_PIN2=GPIO::${resistor2_pin} + COMMON_FLAGS += -DRESISTIVE_LOAD_PIN3=GPIO::${resistor3_pin} + COMMON_FLAGS += -DRESISTIVE_LOAD_PIN4=GPIO::${resistor4_pin} +endif + ifneq ($(findstring softi2c,${drivers}), ) CXX_TARGETS += src/driver/soft_i2c.cc COMMON_FLAGS += -DDRIVER_SOFTI2C -- cgit v1.2.3 From 52f23fad43b47c6cebb38fa387c39d0e27a12797 Mon Sep 17 00:00:00 2001 From: Daniel Friesel <daniel.friesel@uos.de> Date: Mon, 13 Jul 2020 11:25:47 +0200 Subject: Makefile: Set correct resistor4_pin for resistive_load --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5608e8f..45501e2 100644 --- a/Makefile +++ b/Makefile @@ -135,7 +135,7 @@ ifneq ($(findstring resistive_load,${drivers}), ) resistor1_pin ?= p3_0 resistor2_pin ?= p3_1 resistor3_pin ?= p3_2 - resistor4_pin ?= p3_4 + resistor4_pin ?= p3_3 COMMON_FLAGS += -DDRIVER_RESISTIVE_LOAD COMMON_FLAGS += -DRESISTIVE_LOAD_PIN1=GPIO::${resistor1_pin} COMMON_FLAGS += -DRESISTIVE_LOAD_PIN2=GPIO::${resistor2_pin} -- cgit v1.2.3