summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile21
1 files changed, 15 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 98779b1..bcbff7b 100644
--- a/Makefile
+++ b/Makefile
@@ -123,12 +123,21 @@ endif
ifneq ($(findstring sharp96,${drivers}), )
CXX_TARGETS += src/driver/sharp96.cc
- sharp96_power_pin ?= p4_2
- sharp96_en_pin ?= p4_3
- sharp96_cs_pin ?= p2_4
- sharp96_power_pin ?= p1_2
- sharp96_en_pin ?= p6_2
- sharp96_cs_pin ?= p1_3
+ ifeq (${arch}, msp430fr5969lp)
+ sharp96_power_pin ?= p4_2
+ sharp96_en_pin ?= p4_3
+ sharp96_cs_pin ?= p2_4
+ endif
+ ifeq (${arch}, msp430fr5994lp)
+ sharp96_power_pin ?= p1_2
+ sharp96_en_pin ?= p6_2
+ sharp96_cs_pin ?= p1_3
+ endif
+ ifeq (${arch}, msp430fr5994lp-256k)
+ sharp96_power_pin ?= p1_2
+ sharp96_en_pin ?= p6_2
+ sharp96_cs_pin ?= p1_3
+ endif
COMMON_FLAGS += -DDRIVER_SHARP6
COMMON_FLAGS += -DSHARP96_POWER_PIN=GPIO::${sharp96_power_pin}
COMMON_FLAGS += -DSHARP96_EN_PIN=GPIO::${sharp96_en_pin}