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:
@@ -174,7 +174,7 @@ main(int argc, char **argv)
|
|||||||
if (gpio_isr_start(&gpio_info) == MRAA_SUCCESS) {
|
if (gpio_isr_start(&gpio_info) == MRAA_SUCCESS) {
|
||||||
fprintf(stdout, "Monitoring level changes to pin %d. Press RETURN to exit.\n", pin);
|
fprintf(stdout, "Monitoring level changes to pin %d. Press RETURN to exit.\n", pin);
|
||||||
gpio_isr_handler(&gpio_info);
|
gpio_isr_handler(&gpio_info);
|
||||||
getchar();
|
while (getchar() != '\n');
|
||||||
gpio_isr_stop(&gpio_info);
|
gpio_isr_stop(&gpio_info);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user