Revert "serialhdl: Enforce exclusive access on POSIX, this is default behavior on windows. (#1216)"

This reverts commit fdbbda9484.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-02-10 11:57:02 -05:00
parent faedc77621
commit 59a60d68f5
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ class SerialReader:
try:
if self.baud:
self.ser = serial.Serial(
self.serialport, self.baud, timeout=0, exclusive=True)
self.serialport, self.baud, timeout=0)
else:
self.ser = open(self.serialport, 'rb+')
except (OSError, IOError, serial.SerialException) as e:
@ -285,7 +285,7 @@ def stk500v2_leave(ser, reactor):
# Attempt an arduino style reset on a serial port
def arduino_reset(serialport, reactor):
# First try opening the port at a different baud
ser = serial.Serial(serialport, 2400, timeout=0, exclusive=True)
ser = serial.Serial(serialport, 2400, timeout=0)
ser.read(1)
reactor.pause(reactor.monotonic() + 0.100)
# Then toggle DTR