From 550482401d95720306873d1fa1de11717c5845dc Mon Sep 17 00:00:00 2001 From: Lennart Date: Tue, 18 Aug 2020 17:31:49 +0200 Subject: Working version --- src/app/ledblink_and_other_pin/main.cc | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/app/ledblink_and_other_pin/main.cc (limited to 'src/app') diff --git a/src/app/ledblink_and_other_pin/main.cc b/src/app/ledblink_and_other_pin/main.cc new file mode 100644 index 0000000..9a8afc1 --- /dev/null +++ b/src/app/ledblink_and_other_pin/main.cc @@ -0,0 +1,37 @@ +#include "arch.h" +#include "driver/gpio.h" +#include "driver/stdout.h" +#include "driver/uptime.h" + +bool on = false; + +void loop(void) +{ + gpio.led_toggle(1); + if(on) { + gpio.write(GPIO::p1_2, 1); + }else{ + + } + on = !on; +#ifdef TIMER_S + kout << dec << uptime.get_s() << endl; +#else + kout << "beep boop" << endl; +#endif +} + +int main(void) +{ + arch.setup(); + gpio.setup(); + kout.setup(); + + gpio.led_on(0); + kout << "Hello, World!" << endl; + kout << "Test, World!" << endl; + + arch.idle_loop(); + + return 0; +} -- cgit v1.2.3