summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-06-21 11:09:42 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-06-21 11:09:42 +0200
commit0dbe2001333b8f6a01e3082ce16e7326db801991 (patch)
treef35f2643372f94602566f5513555a68d0338f7ac /Makefile
parent6f9e50ca58623e551baa81fa635471b0b340f5af (diff)
add basic nRF24 driver
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 179c493..5740eec 100644
--- a/Makefile
+++ b/Makefile
@@ -58,6 +58,17 @@ ifneq ($(findstring mmsimple,${drivers}), )
COMMON_FLAGS += -DDRIVER_MMSIMPLE
endif
+ifneq ($(findstring nrf24l01,${drivers}), )
+ CXX_TARGETS += src/driver/nrf24l01.cc
+ nrf24l01_en_pin ?= p4_3
+ nrf24l01_cs_pin ?= p2_4
+ nrf24l01_irq_pin ?= p1_5
+ COMMON_FLAGS += -DDRIVER_NRF24L01
+ COMMON_FLAGS += -DNRF24L01_EN_PIN=GPIO::${nrf24l01_en_pin}
+ COMMON_FLAGS += -DNRF24L01_CS_PIN=GPIO::${nrf24l01_cs_pin}
+ COMMON_FLAGS += -DNRF24L01_IRQ_PIN=GPIO::${nrf24l01_irq_pin}
+endif
+
ifneq ($(findstring sharp96,${drivers}), )
CXX_TARGETS += src/driver/sharp96.cc
sharp96_power_pin ?= p1_2