projects
/
contrib
/
mraa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1b9668
)
examples/gpio.c: fix getchar() not working in ssh term
author
Brendan Le Foll
<brendan.le.foll@intel.com>
Tue, 10 Feb 2015 15:50:59 +0000
(15:50 +0000)
committer
Brendan Le Foll
<brendan.le.foll@intel.com>
Tue, 10 Feb 2015 15:50:59 +0000
(15:50 +0000)
This is obviously not a nice way to do input handling but it avoids having more
code in the samples than is really needed
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
examples/gpio.c
patch
|
blob
|
history
diff --git
a/examples/gpio.c
b/examples/gpio.c
index
b4cab15
..
7d7ef70
100644
(file)
--- a/
examples/gpio.c
+++ b/
examples/gpio.c
@@
-174,7
+174,7
@@
main(int argc, char **argv)
if (gpio_isr_start(&gpio_info) == MRAA_SUCCESS) {
fprintf(stdout, "Monitoring level changes to pin %d. Press RETURN to exit.\n", pin);
gpio_isr_handler(&gpio_info);
-
getchar(
);
+
while (getchar() != '\n'
);
gpio_isr_stop(&gpio_info);
}
else