summaryrefslogtreecommitdiff
path: root/src/app/nrf24l01test/main.cc
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/nrf24l01test/main.cc
parent6f9e50ca58623e551baa81fa635471b0b340f5af (diff)
add basic nRF24 driver
Diffstat (limited to 'src/app/nrf24l01test/main.cc')
-rw-r--r--src/app/nrf24l01test/main.cc26
1 files changed, 26 insertions, 0 deletions
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;
+}