Private
Public Access
2
0

examples/gpio.c: fix getchar() not working in ssh term

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>
This commit is contained in:
Brendan Le Foll
2015-02-10 15:50:59 +00:00
parent c1b96680c9
commit b32507064d

View File

@@ -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