summaryrefslogtreecommitdiff
path: root/userspace/echoapp.c
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/echoapp.c')
-rw-r--r--userspace/echoapp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/userspace/echoapp.c b/userspace/echoapp.c
new file mode 100644
index 0000000..4ff75e6
--- /dev/null
+++ b/userspace/echoapp.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+int main()
+{
+ printf("echo app -- press Q to quit\n");
+
+ while(1)
+ {
+ uint8_t c;
+ _read(0,&c,1);
+ printf("%d",c);
+ fflush(stdout);
+
+ if(c=='q')break;
+ }
+}
+