aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: