MCPcopy
hub / github.com/arduino/Arduino / selectSerialPort

Method selectSerialPort

arduino-core/src/processing/app/BaseNoGui.java:932–943  ·  view source on GitHub ↗
(String port)

Source from the content-addressed store, hash-verified

930 }
931
932 public static void selectSerialPort(String port) {
933 PreferencesData.set("serial.port", port);
934 BoardPort boardPort = getDiscoveryManager().find(port, true);
935 if (boardPort != null) {
936 PreferencesData.set("serial.port.iserial", boardPort.getPrefs().get("iserial"));
937 }
938 String portFile = port;
939 if (port.startsWith("/dev/")) {
940 portFile = portFile.substring(5);
941 }
942 PreferencesData.set("serial.port.file", portFile);
943 }
944
945 static public void showError(String title, String message, int exit_code) {
946 showError(title, message, null, exit_code);

Callers 2

selectSerialPortMethod · 0.95

Calls 5

setMethod · 0.95
getDiscoveryManagerMethod · 0.95
getPrefsMethod · 0.95
getMethod · 0.65
findMethod · 0.45

Tested by

no test coverage detected