From 55367f5feedb4a495731e954837bb07b6b6c9809 Mon Sep 17 00:00:00 2001 From: Luka Miljak Date: Tue, 1 Apr 2014 11:58:01 +0000 Subject: [PATCH] Reconfiguring the tty device, basic functionality achived and tested on OlinuXino Lime --- tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tty.c b/tty.c index 9e22d8a..643b542 100644 --- a/tty.c +++ b/tty.c @@ -33,9 +33,9 @@ int tty_open(struct tty_t *tty_dev) { ONOCR | OFILL | OLCUC | OPOST); tty_dev->ttyset.c_lflag &= ~(ECHO | ECHONL | ICANON | IEXTEN | ISIG); tty_dev->ttyset.c_cflag &= ~(CSIZE | PARENB); - tty_dev->ttyset.c_cflag |= CS8; + tty_dev->ttyset.c_cflag |= CS8 | CREAD; tty_dev->ttyset.c_cc[VMIN] = 1; - tty_dev->ttyset.c_cc[VTIME] = 0; + tty_dev->ttyset.c_cc[VTIME] = 5; /* if speed is set to B0 (e.g. cfg file is not provided), default values are used */ if (cfgetispeed(&(tty_dev->ttyset)) == baud_to_speed(0) &&