forked from platformio/platformio-core
Fix firmware uploading to Arduino/Genuino 101 // Resolve #695
This commit is contained in:
1 parent
cdcf075635
commit
682e435ded
4 files changed
+16
-5
No files matched your search
@@ -37,13 +37,15 @@ def FlushSerialBuffer(env, port):
|
||||
|
||||
|
||||
def TouchSerialPort(env, port, baudrate):
|
||||
port = env.subst(port)
|
||||
print "Forcing reset using %dbps open/close on port %s" % (baudrate, port)
|
||||
if system() != "Windows":
|
||||
try:
|
||||
s = Serial(env.subst(port))
|
||||
s = Serial(port)
|
||||
s.close()
|
||||
except: # pylint: disable=W0702
|
||||
pass
|
||||
s = Serial(port=env.subst(port), baudrate=baudrate)
|
||||
s = Serial(port=port, baudrate=baudrate)
|
||||
s.setDTR(False)
|
||||
s.close()
|
||||
sleep(0.4)
|
||||
|
||||
Reference in new issue
Block a user