]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tools/platforms/msp430/motelist/motelist-linux
Update motelist to support cp2103 detection.
[tinyos-2.x.git] / tools / platforms / msp430 / motelist / motelist-linux
index b6f1c407f734a4d92aaa1cc304f65ed9ffe24248..9f9892313a3ad13c09b7e14f8e4cb0b9742d8517 100755 (executable)
@@ -3,6 +3,8 @@ use strict;
 # $Id$
 # @author Cory Sharp <cory@moteiv.com>
 # @author Joe Polastre
+#
+# Changes to support CP2103 by R. Steve Mckown <rsmckown@gmail.com>
 
 my $help = <<'EOF';
 usage: motelist [options]
@@ -59,9 +61,9 @@ print_motelist( sort { cmp_usbdev($a,$b) } @devs );
 #
 sub scan_sysfs {
 
-  #  Scan /sys/bus/usb/drivers/usb for FTDI devices
+  #  Scan /sys/bus/usb/drivers/usb for FTDI and CP2103 devices
   my @ftdidevs =
-    grep { ($_->{UsbVendor}||"") eq "0403" && ($_->{UsbProduct}||"") eq "6001" }
+    grep { (($_->{UsbVendor}||"") eq "0403" && ($_->{UsbProduct}||"") eq "6001") || (($_->{UsbVendor}||"") eq "10c4" && ($_->{UsbProduct}||"") eq "ea60") }
     map { {
       SysPath => $_,
       UsbVendor => snarf("$_/idVendor",1),
@@ -69,7 +71,7 @@ sub scan_sysfs {
     } }
     glob("/sys/bus/usb/drivers/usb/*");
 
-  #  Gather information about each FTDI device
+  #  Gather information about each FTDI and CP2103 device
   for my $f (@ftdidevs) {
     my $syspath = $f->{SysPath};