blob: ad1bc1150a60ae428796e598cd80a534a1aa7234 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#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;
kout << "write: ";
kout << nrf24l01.write("foo", 3, true) << endl;
nrf24l01.startListening();
arch.delay_ms(10);
nrf24l01.stopListening();
}
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;
}
|