Remove serial port speed restriction for macOS

* macOS 10.14 Mojave SDK supports `B57600` and `B115200` in `sys/termio.h`.
  Confirmed compilation on macOS 10.14.6 with Xcode 11.3.1 Command Line Tools.
This commit is contained in:
Kenji Rikitake 2020-09-29 20:27:34 +09:00
parent 0ed3cd2863
commit 66ebee8f8a
1 changed files with 0 additions and 4 deletions

View File

@ -237,12 +237,8 @@ MYFDTYPE serial_port_open (char *devicename, int baud)
case 9600: cfsetispeed (&ts, B9600); cfsetospeed (&ts, B9600); break;
case 19200: cfsetispeed (&ts, B19200); cfsetospeed (&ts, B19200); break;
case 38400: cfsetispeed (&ts, B38400); cfsetospeed (&ts, B38400); break;
#ifndef __APPLE__
// Not defined for Mac OSX.
// https://groups.yahoo.com/neo/groups/direwolf_packet/conversations/messages/2072
case 57600: cfsetispeed (&ts, B57600); cfsetospeed (&ts, B57600); break;
case 115200: cfsetispeed (&ts, B115200); cfsetospeed (&ts, B115200); break;
#endif
default: text_color_set(DW_COLOR_ERROR);
dw_printf ("serial_port_open: Unsupported speed %d. Using 4800.\n", baud);
cfsetispeed (&ts, B4800); cfsetospeed (&ts, B4800);