aboutsummaryrefslogtreecommitdiffstats
path: root/support/scripts
diff options
context:
space:
mode:
authorPerry Hung <iperry@alum.mit.edu>2010-05-28 05:24:21 -0400
committerPerry Hung <iperry@alum.mit.edu>2010-05-28 05:24:21 -0400
commit643461080317191cd3897527ad39a716d4e9d64c (patch)
treed696e6a833d45c29f5e61b1b660d0907636aeafa /support/scripts
parent484e13cdb56001effbe7b232ba2ee847665ceb83 (diff)
downloadlibrambutan-643461080317191cd3897527ad39a716d4e9d64c.tar.gz
librambutan-643461080317191cd3897527ad39a716d4e9d64c.zip
Moved reset script to support directory
For kicks.
Diffstat (limited to 'support/scripts')
-rwxr-xr-xsupport/scripts/reset.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/support/scripts/reset.py b/support/scripts/reset.py
new file mode 100755
index 0000000..e4d0e99
--- /dev/null
+++ b/support/scripts/reset.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+import serial
+import os
+
+try:
+ ser = serial.Serial('/dev/maple', baudrate=115200)
+ ser.open()
+
+ # pull dtr and rts low
+ ser.setRTS(0)
+ ser.setDTR(0)
+
+ # toggle DTR
+ ser.setDTR(1)
+
+ # close
+ ser.close()
+
+except:
+ print "Failed to open the serial port for reset, perhaps this is your first upload or the board was already in bootloader mode"
+