diff options
author | Perry Hung <iperry@alum.mit.edu> | 2010-05-28 03:11:02 -0400 |
---|---|---|
committer | Perry Hung <iperry@alum.mit.edu> | 2010-05-28 03:11:02 -0400 |
commit | 484e13cdb56001effbe7b232ba2ee847665ceb83 (patch) | |
tree | 0a24be35bdcc728b4172a60455b4fe7ac044544d | |
parent | acf8b5476fe601f17aafc2676b2161de12b72213 (diff) | |
download | librambutan-484e13cdb56001effbe7b232ba2ee847665ceb83.tar.gz librambutan-484e13cdb56001effbe7b232ba2ee847665ceb83.zip |
Reset with /dev/maple instead of guessing ttys
Change reset to rely on udev to create a /dev/maple device node
and use that instead of guessing which tty it is.
-rwxr-xr-x | reset.py | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -4,14 +4,7 @@ import serial import os try: - highest = 0 - # this totally won't work on Mac OSX! /dev/ttySOMETHINGELSE? - for f in filter(lambda x: x.startswith('ttyACM'), os.listdir('/dev/')): - if (int(f[6:]) > highest): - highest = int(f[6:]) - - print "Trying /dev/ttyACM%d..." % highest - ser = serial.Serial('/dev/ttyACM%d' % highest, baudrate=115200) + ser = serial.Serial('/dev/maple', baudrate=115200) ser.open() # pull dtr and rts low |