Fixed automatic baud rate enablement

This commit is contained in:
Martin Lund 2016-05-26 09:58:48 +02:00
parent 5406da5ddb
commit 933792d73f
2 changed files with 30 additions and 30 deletions

View file

@ -27,21 +27,21 @@ AC_SUBST([BASH_COMPLETION_DIR])
AM_CONDITIONAL([ENABLE_BASH_COMPLETION],[test "x$with_bash_completion_dir" != "xno"]) AM_CONDITIONAL([ENABLE_BASH_COMPLETION],[test "x$with_bash_completion_dir" != "xno"])
# Check for available terminal I/O speeds # Check for available terminal I/O speeds
AC_CHECK_DECL([B57600], [AC_SUBST([B57600],["57600"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B57600], [AC_SUBST([B57600],["57600"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B115200], [AC_SUBST([B115200],["115200"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B115200], [AC_SUBST([B115200],["115200"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B230400], [AC_SUBST([B230400],["230400"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B230400], [AC_SUBST([B230400],["230400"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B460800], [AC_SUBST([B460800],["460800"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B460800], [AC_SUBST([B460800],["460800"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B500000], [AC_SUBST([B500000],["500000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B500000], [AC_SUBST([B500000],["500000"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B576000], [AC_SUBST([B576000],["576000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B576000], [AC_SUBST([B576000],["576000"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B921600], [AC_SUBST([B921600],["921600"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B921600], [AC_SUBST([B921600],["921600"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B1000000], [AC_SUBST([B1000000],["1000000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B1000000], [AC_SUBST([B1000000],["1000000"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B1152000], [AC_SUBST([B1152000],["1152000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B1152000], [AC_SUBST([B1152000],["1152000"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B1500000], [AC_SUBST([B1500000],["1500000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B1500000], [AC_SUBST([B1500000],["1500000"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B2000000], [AC_SUBST([B2000000],["2000000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B2000000], [AC_SUBST([B2000000],["2000000"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B2500000], [AC_SUBST([B2500000],["2500000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B2500000], [AC_SUBST([B2500000],["2500000"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B3000000], [AC_SUBST([B3000000],["3000000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B3000000], [AC_SUBST([B3000000],["3000000"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B3500000], [AC_SUBST([B3500000],["3500000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B3500000], [AC_SUBST([B3500000],["3500000"])], [], [[#include <termios.h>]])
AC_CHECK_DECL([B4000000], [AC_SUBST([B4000000],["4000000"])], [], [[#include <termios.h>]]) AC_CHECK_DECLS([B4000000], [AC_SUBST([B4000000],["4000000"])], [], [[#include <termios.h>]])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile]) AC_CONFIG_FILES([src/Makefile])

View file

@ -211,77 +211,77 @@ void tty_configure(void)
case 38400: case 38400:
baudrate = B38400; baudrate = B38400;
break; break;
#ifdef HAVE_DECL_B57600 #if HAVE_DECL_B57600
case 57600: case 57600:
baudrate = B57600; baudrate = B57600;
break; break;
#endif #endif
#ifdef HAVE_DECL_B115200 #if HAVE_DECL_B115200
case 115200: case 115200:
baudrate = B115200; baudrate = B115200;
break; break;
#endif #endif
#ifdef HAVE_DECL_B230400 #if HAVE_DECL_B230400
case 230400: case 230400:
baudrate = B230400; baudrate = B230400;
break; break;
#endif #endif
#ifdef HAVE_DECL_B460800 #if HAVE_DECL_B460800
case 460800: case 460800:
baudrate = B460800; baudrate = B460800;
break; break;
#endif #endif
#ifdef HAVE_DECL_B500000 #if HAVE_DECL_B500000
case 500000: case 500000:
baudrate = B500000; baudrate = B500000;
break; break;
#endif #endif
#ifdef HAVE_DECL_B576000 #if HAVE_DECL_B576000
case 576000: case 576000:
baudrate = B576000; baudrate = B576000;
break; break;
#endif #endif
#ifdef HAVE_DECL_B921600 #if HAVE_DECL_B921600
case 921600: case 921600:
baudrate = B921600; baudrate = B921600;
break; break;
#endif #endif
#ifdef HAVE_DECL_B1000000 #if HAVE_DECL_B1000000
case 1000000: case 1000000:
baudrate = B1000000; baudrate = B1000000;
break; break;
#endif #endif
#ifdef HAVE_DECL_B1152000 #if HAVE_DECL_B1152000
case 1152000: case 1152000:
baudrate = B1152000; baudrate = B1152000;
break; break;
#endif #endif
#ifdef HAVE_DECL_B1500000 #if HAVE_DECL_B1500000
case 1500000: case 1500000:
baudrate = B1500000; baudrate = B1500000;
break; break;
#endif #endif
#ifdef HAVE_DECL_B2000000 #if HAVE_DECL_B2000000
case 2000000: case 2000000:
baudrate = B2000000; baudrate = B2000000;
break; break;
#endif #endif
#ifdef HAVE_DECL_B2500000 #if HAVE_DECL_B2500000
case 2500000: case 2500000:
baudrate = B2500000; baudrate = B2500000;
break; break;
#endif #endif
#ifdef HAVE_DECL_B3000000 #if HAVE_DECL_B3000000
case 3000000: case 3000000:
baudrate = B3000000; baudrate = B3000000;
break; break;
#endif #endif
#ifdef HAVE_DECL_B3500000 #if HAVE_DECL_B3500000
case 3500000: case 3500000:
baudrate = B3500000; baudrate = B3500000;
break; break;
#endif #endif
#ifdef HAVE_DECL_B4000000 #if HAVE_DECL_B4000000
case 4000000: case 4000000:
baudrate = B4000000; baudrate = B4000000;
break; break;