FreeCalypso > hg > freecalypso-sw
comparison target-utils/c139explore/mygetchar.c @ 946:845c2e420069
target-utils/c139explore utility started
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 02 Nov 2015 18:09:37 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
945:86ff6d0b0a97 | 946:845c2e420069 |
---|---|
1 /* | |
2 * The interactive command entry (editing) function in libcommon | |
3 * will call mygetchar() for its character input. It is supposed | |
4 * to be a blocking wait for input, but in some programs other | |
5 * processing can be done while waiting - for example, check for | |
6 * keypad presses as well. This is the basic version which waits | |
7 * for serial input and nothing else. | |
8 */ | |
9 | |
10 extern int serial_in_poll(); | |
11 | |
12 int | |
13 mygetchar() | |
14 { | |
15 register int c; | |
16 | |
17 do | |
18 c = serial_in_poll(); | |
19 while (c < 0); | |
20 return c; | |
21 } |