Skip to content

Commit 66ebee8

Browse files
committed
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.
1 parent 0ed3cd2 commit 66ebee8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Diff for: src/serial_port.c

-4
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,8 @@ MYFDTYPE serial_port_open (char *devicename, int baud)
237237
case 9600: cfsetispeed (&ts, B9600); cfsetospeed (&ts, B9600); break;
238238
case 19200: cfsetispeed (&ts, B19200); cfsetospeed (&ts, B19200); break;
239239
case 38400: cfsetispeed (&ts, B38400); cfsetospeed (&ts, B38400); break;
240-
#ifndef __APPLE__
241-
// Not defined for Mac OSX.
242-
// https://groups.yahoo.com/neo/groups/direwolf_packet/conversations/messages/2072
243240
case 57600: cfsetispeed (&ts, B57600); cfsetospeed (&ts, B57600); break;
244241
case 115200: cfsetispeed (&ts, B115200); cfsetospeed (&ts, B115200); break;
245-
#endif
246242
default: text_color_set(DW_COLOR_ERROR);
247243
dw_printf ("serial_port_open: Unsupported speed %d. Using 4800.\n", baud);
248244
cfsetispeed (&ts, B4800); cfsetospeed (&ts, B4800);

0 commit comments

Comments
 (0)