From 1445708f0f53b47054f388877d410a1ec1a2eca7 Mon Sep 17 00:00:00 2001 From: Phraust Date: Sun, 8 Jul 2012 02:35:43 +0000 Subject: [PATCH] Use standard cfsetispeed/cfsetospeed to set baud rate on *nix --- fpgautils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fpgautils.c b/fpgautils.c index 12e3847d..0ebee7f6 100644 --- a/fpgautils.c +++ b/fpgautils.c @@ -211,8 +211,8 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p case 0: break; case 115200: - my_termios.c_cflag &= ~CBAUD; - my_termios.c_cflag |= B115200; + cfsetispeed( &my_termios, B115200 ); + cfsetospeed( &my_termios, B115200 ); break; // TODO: try some higher speeds with the Icarus and BFL to see // if they support them and if setting them makes any difference