From 80ad05830d41fd387b681788a15ddb942947d898 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Wed, 21 Apr 2010 19:27:21 +0200 Subject: osmocom: Fix serial init (CSIZE field) Since we clear the whole CSIZE, we need to set CS8 _after_ the clearing or it'll just get erased ... Signed-off-by: Sylvain Munaut --- src/host/osmocon/osmocon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/host/osmocon/osmocon.c') diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c index 850e928c..b823b5b8 100644 --- a/src/host/osmocon/osmocon.c +++ b/src/host/osmocon/osmocon.c @@ -202,8 +202,8 @@ static int serial_init(const char *serial_port) } cfsetispeed(&tio, MODEM_BAUDRATE); cfsetospeed(&tio, MODEM_BAUDRATE); - tio.c_cflag |= (CREAD | CLOCAL | CS8); tio.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS); + tio.c_cflag |= (CREAD | CLOCAL | CS8); tio.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); tio.c_iflag |= (INPCK | ISTRIP); tio.c_iflag &= ~(ISTRIP | IXON | IXOFF | IGNBRK | INLCR | ICRNL | IGNCR); -- cgit v1.2.3