From 643461080317191cd3897527ad39a716d4e9d64c Mon Sep 17 00:00:00 2001 From: Perry Hung Date: Fri, 28 May 2010 05:24:21 -0400 Subject: Moved reset script to support directory For kicks. --- support/scripts/reset.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 support/scripts/reset.py (limited to 'support/scripts') 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" + -- cgit v1.2.3