blob: 5e7b339d7b08fa8871acf68d3a7660b45b380c51 (
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
|
#include "arch.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
#include "driver/uptime.h"
int main(void)
{
arch.setup();
gpio.setup();
kout.setup();
kout << "Hello, World!" << endl;
kout << "Naptime." << endl;
#ifdef CONFIG_ETCONTROLLER_NRST
gpio.output(CONFIG_ETCONTROLLER_RESET_PIN, 0);
arch.delay_ms(1);
gpio.write(CONFIG_ETCONTROLLER_RESET_PIN, 1);
#else
gpio.output(CONFIG_ETCONTROLLER_RESET_PIN, 1);
arch.delay_ms(1);
gpio.write(CONFIG_ETCONTROLLER_RESET_PIN, 0);
#endif
arch.idle();
return 0;
}
|