summaryrefslogtreecommitdiff
path: root/src/app
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 /src/app
parent6f9e50ca58623e551baa81fa635471b0b340f5af (diff)
add basic nRF24 driver
Diffstat (limited to 'src/app')
-rw-r--r--src/app/nrf24l01test/Makefile.inc2
-rw-r--r--src/app/nrf24l01test/main.cc26
2 files changed, 28 insertions, 0 deletions
diff --git a/src/app/nrf24l01test/Makefile.inc b/src/app/nrf24l01test/Makefile.inc
new file mode 100644
index 0000000..67e9c68
--- /dev/null
+++ b/src/app/nrf24l01test/Makefile.inc
@@ -0,0 +1,2 @@
+timer_s ?= 1
+loop ?= 1
diff --git a/src/app/nrf24l01test/main.cc b/src/app/nrf24l01test/main.cc
new file mode 100644
index 0000000..2f65a7c
--- /dev/null
+++ b/src/app/nrf24l01test/main.cc
@@ -0,0 +1,26 @@
+#include "arch.h"
+#include "driver/gpio.h"
+#include "driver/stdout.h"
+#include "driver/nrf24l01.h"
+
+void loop(void)
+{
+ gpio.led_toggle(1);
+ kout << "status: " << hex << nrf24l01.getStatus() << endl;
+}
+
+int main(void)
+{
+ arch.setup();
+ gpio.setup();
+ kout.setup();
+
+ kout << "nrf24l01.setup() ...";
+ nrf24l01.setup();
+ kout << " OK" << endl;
+
+ gpio.led_on(0);
+ arch.idle_loop();
+
+ return 0;
+}