From e37d2df358e2963004b4f4710d27e458e44b5eed Mon Sep 17 00:00:00 2001 From: Michael Rimestad Date: Fri, 10 Jan 2020 14:50:44 +0100 Subject: [PATCH] Disabled input processing --- Sources/SwiftSerial.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/SwiftSerial.swift b/Sources/SwiftSerial.swift index d8ac716..2b9c8fc 100644 --- a/Sources/SwiftSerial.swift +++ b/Sources/SwiftSerial.swift @@ -299,6 +299,9 @@ public class SerialPort { settings.c_cflag &= ~tcflag_t(CSIZE) settings.c_cflag |= dataBitsSize.flagValue + //Disable input mapping of CR to NL, mapping of NL into CR, and ignoring CR + settings.c_iflag &= ~tcflag_t(ICRNL | INLCR | IGNCR) + // Set hardware flow control flag #if os(Linux) if useHardwareFlowControl {