diff options
| author | Daniel Friesel <derf@finalrewind.org> | 2019-01-31 10:56:22 +0100 | 
|---|---|---|
| committer | Daniel Friesel <derf@finalrewind.org> | 2019-01-31 10:56:42 +0100 | 
| commit | 3fb252d01948f9fd78116e53a3da9c5b61c4a804 (patch) | |
| tree | 241057aa8f84fefc050a12918342b51e6480372e /src/app | |
| parent | 0f648924fd832a26978c338af3eb4db6e5919665 (diff) | |
add simple compile and option-combination tests for posix arch
Diffstat (limited to 'src/app')
| -rw-r--r-- | src/app/test_basic/Makefile.inc | 0 | ||||
| -rw-r--r-- | src/app/test_basic/main.cc | 31 | 
2 files changed, 31 insertions, 0 deletions
| diff --git a/src/app/test_basic/Makefile.inc b/src/app/test_basic/Makefile.inc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/app/test_basic/Makefile.inc diff --git a/src/app/test_basic/main.cc b/src/app/test_basic/main.cc new file mode 100644 index 0000000..4ac5067 --- /dev/null +++ b/src/app/test_basic/main.cc @@ -0,0 +1,31 @@ +#include "arch.h" +#include "driver/gpio.h" +#include "driver/stdout.h" +#include "driver/uptime.h" + +void loop(void) +{ +	kout << "Loop" << endl; +	gpio.led_toggle(0); +#ifdef TIMER_S +	kout << dec << uptime.get_s() << endl; +#endif +} + +int main(void) +{ +	arch.setup(); +	gpio.setup(); +	kout.setup(); + +	/* +	 * There may be some delay between program start and UART capture start. +	 */ +	for (uint8_t i = 0; i < 255; i++) { +		kout << "Hello, World!" << endl; +	} + +	arch.idle_loop(); + +	return 0; +} | 
