diff --git a/ArduinoFloppyReader/lib/SerialIO.cpp b/ArduinoFloppyReader/lib/SerialIO.cpp index 1c5c9dc..79d25ff 100644 --- a/ArduinoFloppyReader/lib/SerialIO.cpp +++ b/ArduinoFloppyReader/lib/SerialIO.cpp @@ -650,9 +650,7 @@ SerialIO::Response SerialIO::configurePort(const Configuration& configuration) { // Now try to set the baud rate int baud = configuration.baudRate; -#ifdef __APPLE__ - if (ioctl(m_portHandle, IOSSIOSPEED, &baud) == -1) return Response::rUnknownError; -#else +#ifndef __APPLE__ if (baud == 9600) { term.c_cflag &= ~CBAUD; term.c_cflag |= B9600; @@ -680,6 +678,10 @@ SerialIO::Response SerialIO::configurePort(const Configuration& configuration) { ioctl(m_portHandle, TIOCSSERIAL, &serial); #endif +#ifdef __APPLE__ + if (ioctl(m_portHandle, IOSSIOSPEED, &baud) == -1) return Response::rUnknownError; +#endif + setDTR(true); setRTS(true);