aboutsummaryrefslogtreecommitdiff
path: root/PL0_test.c
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-11-12 17:56:10 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-11-12 17:56:10 +0100
commit533976feb8ea79c15fa905642d75adb58a0e6996 (patch)
tree11d5b9b56754e3457256d23c25535d19fc0402e1 /PL0_test.c
parent30b44ef0b1177d13dd4f58c47979e7a6e598d81a (diff)
downloadrpi-MMU-example-533976feb8ea79c15fa905642d75adb58a0e6996.tar.gz
rpi-MMU-example-533976feb8ea79c15fa905642d75adb58a0e6996.zip
TEST CODE: prepare for switching to PL0
Diffstat (limited to 'PL0_test.c')
-rw-r--r--PL0_test.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/PL0_test.c b/PL0_test.c
new file mode 100644
index 0000000..1a3d49d
--- /dev/null
+++ b/PL0_test.c
@@ -0,0 +1,18 @@
+#include "uart.h"
+
+void PL0_main(void)
+{
+ uart_puts("hello PL0!\n\r");
+
+ while (1)
+ {
+ char c;
+ switch(c = uart_getc())
+ {
+ case '\r':
+ uart_putc('\n');
+ default:
+ uart_putc(c);
+ }
+ }
+}