annotate loadagent/serwait.c @ 7:aa1f6fe16fef

loadtools building blocks started
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 30 Apr 2013 07:19:48 +0000
parents da98dc08f575
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /* this C module is a wrapper around serio.S */
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 /* we implement serial_in_wait() as a C wrapper around serial_in_poll() */
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 extern int serial_in_poll();
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 int serial_in_wait()
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 {
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 register int c;
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 do
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 c = serial_in_poll();
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 while (c < 0);
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 return c;
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 }