1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-12 03:25:22 +02:00

Bug 481199 - Add support for cu serial devices on Mac.

Change-Id: I1323ad71ab8d4d76c74380ad06d5216865bebe92
This commit is contained in:
Doug Schaefer 2016-06-27 12:02:13 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent dc769db3cc
commit cf39a83897

View file

@ -226,7 +226,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("ttyUSB.*")); //$NON-NLS-1$
} else if (osName.startsWith("Windows")) { //$NON-NLS-1$