summaryrefslogtreecommitdiff
path: root/src/app/sysinfo
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-01-29 11:43:15 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-01-29 11:43:15 +0100
commit974f1a7eb28f56221f53cedb87b505bafa02d8a5 (patch)
tree1d5784b4ae6978863ff8344ba169a6f3633920e6 /src/app/sysinfo
parent2282aea47e55559008e1115fcad578bac8858df8 (diff)
add sysinfo application
Diffstat (limited to 'src/app/sysinfo')
-rw-r--r--src/app/sysinfo/Makefile.inc1
-rw-r--r--src/app/sysinfo/main.cc33
2 files changed, 34 insertions, 0 deletions
diff --git a/src/app/sysinfo/Makefile.inc b/src/app/sysinfo/Makefile.inc
new file mode 100644
index 0000000..4cc2151
--- /dev/null
+++ b/src/app/sysinfo/Makefile.inc
@@ -0,0 +1 @@
+loop = 1
diff --git a/src/app/sysinfo/main.cc b/src/app/sysinfo/main.cc
new file mode 100644
index 0000000..a2e2660
--- /dev/null
+++ b/src/app/sysinfo/main.cc
@@ -0,0 +1,33 @@
+#include "arch.h"
+#include "driver/gpio.h"
+#include "driver/stdout.h"
+#include "driver/uptime.h"
+
+void loop(void)
+{
+ static unsigned char done = 0;
+
+ if (!done) {
+ kout << "sizeof(char) = " << sizeof(char) << endl;
+ kout << "sizeof(short) = " << sizeof(short) << endl;
+ kout << "sizeof(int) = " << sizeof(int) << endl;
+ kout << "sizeof(long int) = " << sizeof(long int) << endl;
+ kout << "sizeof(long long) = " << sizeof(long long) << endl;
+ kout << "sizeof(float) = " << sizeof(float) << endl;
+ kout << "sizeof(double) = " << sizeof(double) << endl;
+ done = 1;
+ }
+}
+
+int main(void)
+{
+ arch.setup();
+ gpio.setup();
+ kout.setup();
+
+ kout << "Hello, World!" << endl;
+
+ arch.idle_loop();
+
+ return 0;
+}