diff options
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/nrf24l01test/Makefile.inc | 2 | ||||
-rw-r--r-- | src/app/nrf24l01test/main.cc | 26 |
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; +} |