diff options
Diffstat (limited to 'src/app/etcontroller/main.cc')
-rw-r--r-- | src/app/etcontroller/main.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/app/etcontroller/main.cc b/src/app/etcontroller/main.cc new file mode 100644 index 0000000..5e7b339 --- /dev/null +++ b/src/app/etcontroller/main.cc @@ -0,0 +1,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; +} |