aboutsummaryrefslogtreecommitdiffstats
path: root/support/scripts
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2010-06-10 13:07:53 -0400
committerbnewbold <bnewbold@robocracy.org>2010-06-10 13:07:53 -0400
commitd349b13258e71d17a4497605348edeee5212a5d7 (patch)
treed022257a1746d5ae7d46285e0058a21dfe343045 /support/scripts
parent8f039a4023a74630dba06529a34400d8c405023a (diff)
downloadlibrambutan-d349b13258e71d17a4497605348edeee5212a5d7.tar.gz
librambutan-d349b13258e71d17a4497605348edeee5212a5d7.zip
new reset scheme, compatbile with old
Diffstat (limited to 'support/scripts')
-rwxr-xr-xsupport/scripts/reset.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/support/scripts/reset.py b/support/scripts/reset.py
index 90ff331..a84d76a 100755
--- a/support/scripts/reset.py
+++ b/support/scripts/reset.py
@@ -4,16 +4,22 @@ import serial
import os
from struct import pack
try:
- ser = serial.Serial('/dev/ttyACM0', baudrate=115200)
+ ser = serial.Serial('/dev/maple', baudrate=115200)
ser.open()
- # toggle DTR
+ # try to toggle DTR/RTS (old scheme)
+ ser.setRTS(0)
+ ser.setDTR(0)
ser.setDTR(1)
ser.setDTR(0)
+ # try magic number
+ ser.setRTS(1)
+ ser.setDTR(1)
+ ser.setDTR(0)
ser.write("1EAF")
- # close
+ # ok we're done here
ser.close()
except: