mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-09 22:24:14 +03:00
Merge igrr/esp8266 into esp8266
* commit '8b081ebe9682d92ea4fab8bd233342580d36a7eb': Enable reset control for generic esp8266 boards Corrected accidentally committed wrong file Added to configuration options to disable ArduinoIDE SerialMonitor to set DTR and RTS active when the Monitor is opened
This commit is contained in:
@@ -57,27 +57,35 @@ public class Serial implements SerialPortEventListener {
|
||||
PreferencesData.getInteger("serial.debug_rate"),
|
||||
PreferencesData.get("serial.parity").charAt(0),
|
||||
PreferencesData.getInteger("serial.databits"),
|
||||
new Float(PreferencesData.get("serial.stopbits")).floatValue());
|
||||
new Float(PreferencesData.get("serial.stopbits")).floatValue(),
|
||||
BaseNoGui.getBoardPreferences().get("serial.disableRTS") == null,
|
||||
BaseNoGui.getBoardPreferences().get("serial.disableDTR") == null);
|
||||
}
|
||||
|
||||
public Serial(int irate) throws SerialException {
|
||||
this(PreferencesData.get("serial.port"), irate,
|
||||
PreferencesData.get("serial.parity").charAt(0),
|
||||
PreferencesData.getInteger("serial.databits"),
|
||||
new Float(PreferencesData.get("serial.stopbits")).floatValue());
|
||||
new Float(PreferencesData.get("serial.stopbits")).floatValue(),
|
||||
BaseNoGui.getBoardPreferences().get("serial.disableRTS") == null,
|
||||
BaseNoGui.getBoardPreferences().get("serial.disableDTR") == null);
|
||||
}
|
||||
|
||||
public Serial(String iname, int irate) throws SerialException {
|
||||
this(iname, irate, PreferencesData.get("serial.parity").charAt(0),
|
||||
PreferencesData.getInteger("serial.databits"),
|
||||
new Float(PreferencesData.get("serial.stopbits")).floatValue());
|
||||
new Float(PreferencesData.get("serial.stopbits")).floatValue(),
|
||||
BaseNoGui.getBoardPreferences().get("serial.disableRTS") == null,
|
||||
BaseNoGui.getBoardPreferences().get("serial.disableDTR") == null);
|
||||
}
|
||||
|
||||
public Serial(String iname) throws SerialException {
|
||||
this(iname, PreferencesData.getInteger("serial.debug_rate"),
|
||||
PreferencesData.get("serial.parity").charAt(0),
|
||||
PreferencesData.getInteger("serial.databits"),
|
||||
new Float(PreferencesData.get("serial.stopbits")).floatValue());
|
||||
new Float(PreferencesData.get("serial.stopbits")).floatValue(),
|
||||
BaseNoGui.getBoardPreferences().get("serial.disableRTS") == null,
|
||||
BaseNoGui.getBoardPreferences().get("serial.disableDTR") == null);
|
||||
}
|
||||
|
||||
public static boolean touchPort(String iname, int irate) throws SerialException {
|
||||
@@ -100,7 +108,7 @@ public class Serial implements SerialPortEventListener {
|
||||
}
|
||||
}
|
||||
|
||||
public Serial(String iname, int irate, char iparity, int idatabits, float istopbits) throws SerialException {
|
||||
public Serial(String iname, int irate, char iparity, int idatabits, float istopbits, boolean setRTS, boolean setDTR) throws SerialException {
|
||||
//if (port != null) port.close();
|
||||
//this.parent = parent;
|
||||
//parent.attach(this);
|
||||
@@ -120,7 +128,7 @@ public class Serial implements SerialPortEventListener {
|
||||
try {
|
||||
port = new SerialPort(iname);
|
||||
port.openPort();
|
||||
port.setParams(rate, databits, stopbits, parity, true, true);
|
||||
port.setParams(rate, databits, stopbits, parity, setRTS, setDTR);
|
||||
port.addEventListener(this);
|
||||
} catch (Exception e) {
|
||||
throw new SerialException(I18n.format(_("Error opening serial port ''{0}''."), iname), e);
|
||||
|
@@ -5,9 +5,11 @@ esp01.name=Generic ESP8266 board
|
||||
|
||||
esp01.upload.tool=esptool
|
||||
esp01.upload.speed=115200
|
||||
esp01.upload.resetmethod=none
|
||||
esp01.upload.resetmethod=ck
|
||||
esp01.upload.maximum_size=524288
|
||||
esp01.upload.wait_for_upload_port=true
|
||||
esp01.serial.disableDTR=true
|
||||
esp01.serial.disableRTS=true
|
||||
|
||||
esp01.build.mcu=esp8266
|
||||
esp01.build.f_cpu=80000000L
|
||||
|
Reference in New Issue
Block a user