summaryrefslogtreecommitdiff
path: root/src/app/ledblink_and_other_pin/main.cc
blob: 9a8afc12aac1431c12e6b93a6247320759088950 (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
32
33
34
35
36
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;
}