diff loadagent/serwait.c @ 1:da98dc08f575

loadagent: beginning to lay the foundation
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 29 Apr 2013 03:21:00 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/loadagent/serwait.c	Mon Apr 29 03:21:00 2013 +0000
@@ -0,0 +1,14 @@
+/* this C module is a wrapper around serio.S */
+/* we implement serial_in_wait() as a C wrapper around serial_in_poll() */
+
+extern int serial_in_poll();
+
+int serial_in_wait()
+{
+	register int c;
+
+	do
+		c = serial_in_poll();
+	while (c < 0);
+	return c;
+}