                             transmitRate: BaudRate,
                             minimumBytesToRead: Int,
                             timeout: Int = 0, /* 0 means wait indefinitely */
-                            enableParity: Bool = false,
+                            parityType: ParityType = .none,
                             sendTwoStopBits: Bool = false, /* 1 stop bit is the default */
                             dataBitsSize: DataBitsSize = .bits8,
                             useHardwareFlowControl: Bool = false,

            return tcflag_t(CS8)
        }
    }
}

public enum PortError: Int32, Error {

        cfsetispeed(&settings, receiveRate.speedValue)
        cfsetospeed(&settings, transmitRate.speedValue)

        // Enable parity (even/odd) if needed
        settings.c_cflag |= parityType.parityValue

        // Set stop bit flag
        if sendTwoStopBits {
