FreeCalypso > hg > freecalypso-tools
annotate target-utils/buzplayer/mygetchar.c @ 505:7bf0d909c87e
fc-loadtool flash ID check: change of reset after the check logic
This change only affects those flash configurations that have ID checks
enabled. The logic for resetting the flash after the ID check has been
changed as follows:
1) If the check fails, we return without attempting to reset the flash.
2) If the check is successful, we reset the flash using the configured
method (could be AMD or Intel or Intel W30) instead of always doing an
AMD flash reset as the original code did.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 27 May 2019 19:58:01 +0000 |
parents | 5bbba2cab6f3 |
children |
rev | line source |
---|---|
76
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * The interactive command entry (editing) function in libcommon |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * will call mygetchar() for its character input. It is supposed |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * to be a blocking wait for input, but in some programs other |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * processing can be done while waiting - for example, check for |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 * keypad presses as well. This is the basic version which waits |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 * for serial input and nothing else. |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 */ |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 extern int serial_in_poll(); |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 int |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 mygetchar() |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 { |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 register int c; |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 do |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 c = serial_in_poll(); |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 while (c < 0); |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 return c; |
5bbba2cab6f3
target-utils: buzplayer started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 } |