Commit ddbd0937 authored by Daniel Friesel's avatar Daniel Friesel
Browse files

Makefile: Auto-select sharp96 pins based on arch

parent 774aa577
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -123,12 +123,21 @@ endif

ifneq ($(findstring sharp96,${drivers}), )
	CXX_TARGETS += src/driver/sharp96.cc
	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}