1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

#77: added custom baudrate support for FreeBSD

This commit is contained in:
Joe Merten
2017-12-31 07:32:23 +01:00
parent 78abf75112
commit b78410aa04
4 changed files with 43 additions and 47 deletions

22
term.c
View File

@ -61,9 +61,9 @@
#include "termios2.h"
#endif
#if defined(__APPLE__) && defined(USE_CUSTOM_BAUD)
/* only for OSX, Tiger and above */
#include "custbaud_osx.h"
#if (defined (__FreeBSD__) || defined(__APPLE__)) && defined(USE_CUSTOM_BAUD)
/* only for FreeBSD and macOS (Tiger and above) */
#include "custbaud_bsd.h"
#endif
/* Time to wait for UART to clear after a drain (in usec). */
@ -170,22 +170,6 @@ term_perror (const char *prefix)
/***************************************************************************/
/* OSX termios.h unfortunately just provides constants for baudrates
up to 230k, so we add the missing constants here. */
#if defined(__APPLE__) && defined(HIGH_BAUD)
#ifndef B460800
#define B460800 460800
#endif
#ifndef B921600
#define B921600 921600
#endif
#endif /* __APPLE__ */
/***************************************************************************/
#define BNONE 0xFFFFFFFF
struct baud_codes {