diff options
author | Perry Hung <iperry@alum.mit.edu> | 2010-05-28 05:24:21 -0400 |
---|---|---|
committer | Perry Hung <iperry@alum.mit.edu> | 2010-05-28 05:24:21 -0400 |
commit | 643461080317191cd3897527ad39a716d4e9d64c (patch) | |
tree | d696e6a833d45c29f5e61b1b660d0907636aeafa /support | |
parent | 484e13cdb56001effbe7b232ba2ee847665ceb83 (diff) | |
download | librambutan-643461080317191cd3897527ad39a716d4e9d64c.tar.gz librambutan-643461080317191cd3897527ad39a716d4e9d64c.zip |
Moved reset script to support directory
For kicks.
Diffstat (limited to 'support')
-rwxr-xr-x | support/scripts/reset.py | 22 |
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" + |