projects
/
simavr
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac39b7b
)
i2ctest: Make example exit properly
author
Michel Pollet
<buserror@gmail.com>
Sat, 25 Feb 2012 10:05:59 +0000
(10:05 +0000)
committer
Michel Pollet
<buserror@gmail.com>
Sat, 25 Feb 2012 10:18:13 +0000
(10:18 +0000)
Demo was trying to exit, but the harness wasn't
Signed-off-by: Michel Pollet <buserror@gmail.com>
examples/board_i2ctest/i2ctest.c
patch
|
blob
|
history
diff --git
a/examples/board_i2ctest/i2ctest.c
b/examples/board_i2ctest/i2ctest.c
index
9d43932
..
7cb80d3
100644
(file)
--- a/
examples/board_i2ctest/i2ctest.c
+++ b/
examples/board_i2ctest/i2ctest.c
@@
-81,6
+81,9
@@
int main(int argc, char *argv[])
printf( "Demo launching:\n");
- while (1)
- avr_run(avr);
+ while (1) {
+ int state = avr_run(avr);
+ if ( state == cpu_Done || state == cpu_Crashed)
+ break;
+ }
}