Don't use rate_to_code() for termios; cfset[oi]speed() does the conversion.
This commit is contained in:
parent
9b9fa4f2a0
commit
96933ee163
@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: ser-unix.c,v 1.1 1994/01/28 12:40:33 pk Exp $
|
$Id: ser-unix.c,v 1.2 1994/09/19 01:00:48 mycroft Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
@ -498,6 +498,8 @@ hardwire_readchar(scb, timeout)
|
|||||||
return *scb->bufp++;
|
return *scb->bufp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(TERMIOS)
|
||||||
|
|
||||||
#ifndef B19200
|
#ifndef B19200
|
||||||
#define B19200 EXTA
|
#define B19200 EXTA
|
||||||
#endif
|
#endif
|
||||||
@ -547,6 +549,8 @@ rate_to_code(rate)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hardwire_setbaudrate(scb, rate)
|
hardwire_setbaudrate(scb, rate)
|
||||||
serial_t scb;
|
serial_t scb;
|
||||||
@ -558,8 +562,8 @@ hardwire_setbaudrate(scb, rate)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
#ifdef HAVE_TERMIOS
|
#ifdef HAVE_TERMIOS
|
||||||
cfsetospeed (&state.termios, rate_to_code (rate));
|
cfsetospeed (&state.termios, rate);
|
||||||
cfsetispeed (&state.termios, rate_to_code (rate));
|
cfsetispeed (&state.termios, rate);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_TERMIO
|
#ifdef HAVE_TERMIO
|
||||||
|
Loading…
Reference in New Issue
Block a user