From d349b13258e71d17a4497605348edeee5212a5d7 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 10 Jun 2010 13:07:53 -0400 Subject: new reset scheme, compatbile with old --- support/scripts/reset.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'support') 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: -- cgit v1.2.3