diff options
author | Lennart <lekaiser@uos.de> | 2020-08-18 17:31:49 +0200 |
---|---|---|
committer | Lennart <lekaiser@uos.de> | 2020-08-18 17:31:49 +0200 |
commit | 550482401d95720306873d1fa1de11717c5845dc (patch) | |
tree | aa38f8aa4cf239dfdb1f7da3d8389ea0871e8f63 /src/app | |
parent | 714e5788be7b89f937fe8dbf270b8035c4f7d436 (diff) |
Working version
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/ledblink_and_other_pin/main.cc | 37 |
1 files changed, 37 insertions, 0 deletions
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; +} |