Bug 481199 - Add support for cu.usb... devices on Mac.
authorDoug Schaefer <dschaefer@qnx.com>
Sun, 1 Nov 2015 23:39:02 +0000 (18:39 -0500)
committerDoug Schaefer <dschaefer@qnx.com>
Sun, 1 Nov 2015 23:39:02 +0000 (18:39 -0500)
Apparently needed by the Intel Arduino boards.

Change-Id: I5e1b7c3876dc042f8d8df2ba95df258157fd5c61

native/org.eclipse.cdt.native.serial/src/org/eclipse/cdt/serial/SerialPort.java

index f53e75b..0b4fb6f 100644 (file)
@@ -222,7 +222,7 @@ public class SerialPort {
        public static String[] list() throws IOException {
                String osName = System.getProperty("os.name"); //$NON-NLS-1$
                if (osName.equals("Mac OS X")) { //$NON-NLS-1$
-                       return listDevs(Pattern.compile("tty\\..*(usbserial|usbmodem).*")); //$NON-NLS-1$
+                       return listDevs(Pattern.compile("(tty|cu)\\..*(usbserial|usbmodem).*")); //$NON-NLS-1$
                } else if (osName.equals("Linux")) { //$NON-NLS-1$
                        return listDevs(Pattern.compile("tty(USB|ACM).*")); //$NON-NLS-1$
                } else if (osName.startsWith("Windows")) { //$NON-NLS-1$