annotate target-utils/helloapp/mygetchar.c @ 843:7666dd5df2bc

gsm-fw: libgdi.a added to the link with CONFIG_INCLUDE_PS gtamodem-gsm build almost passes, now only CST is missing
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sat, 25 Apr 2015 19:49:37 +0000
parents 40f607bb0a2c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
1 /*
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
2 * The interactive command entry (editing) function in libcommon
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
3 * will call mygetchar() for its character input. It is supposed
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
4 * to be a blocking wait for input, but in some programs other
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
5 * processing can be done while waiting - for example, check for
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
6 * keypad presses as well. This is the basic version which waits
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
7 * for serial input and nothing else.
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
8 */
1
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 extern int serial_in_poll();
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11
11
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
12 int
40f607bb0a2c target-utils refactored
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 1
diff changeset
13 mygetchar()
1
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 {
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 register int c;
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 do
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 c = serial_in_poll();
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 while (c < 0);
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 return c;
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 }