diff options
author | bnewbold <bnewbold@robocracy.org> | 2010-06-10 13:07:53 -0400 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2010-06-10 13:07:53 -0400 |
commit | d349b13258e71d17a4497605348edeee5212a5d7 (patch) | |
tree | d022257a1746d5ae7d46285e0058a21dfe343045 | |
parent | 8f039a4023a74630dba06529a34400d8c405023a (diff) | |
download | librambutan-d349b13258e71d17a4497605348edeee5212a5d7.tar.gz librambutan-d349b13258e71d17a4497605348edeee5212a5d7.zip |
new reset scheme, compatbile with old
-rwxr-xr-x | support/scripts/reset.py | 12 |
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: |