Arduino
Arduino copied to clipboard
SoftwareSerial lacks AVR compatability methods
Basic Infos
Hardware
Hardware: ESP-12 Core Version: 2.1.0-rc2
Description
The methods added to SoftwareSerial here: https://github.com/plerup/espsoftwareserial/blob/master/SoftwareSerial.h do not seem to be in the current core, specifically these:
// AVR compatibility methods
bool listen() { enableRx(true); return true; }
void end() { stopListening(); }
bool isListening() { return m_rxEnabled; }
bool stopListening() { enableRx(false); return true; }
and
bool m_overflow;
Thanks.
Settings in IDE
Module: Huzzah Flash Size: 4MB CPU Frequency: 80Mhz Flash Mode: qio Flash Frequency: 40Mhz Upload Using: SERIAL Reset Method: ck
Sketch
#include <SoftwareSerial.h>
SoftwareSerial swSer(14, 12, false, 256);
void setup() {
Serial.begin(115200);
swSer.begin(115200);
Serial.println("\nSoftware serial test started");
for (char ch = ' '; ch <= 'z'; ch++) {
swSer.write(ch);
}
swSer.println("");
Serial.println(swSer.overflow());
swSer.end();
}
void loop() {
while (swSer.available() > 0) {
Serial.write(swSer.read());
}
while (Serial.available() > 0) {
swSer.write(Serial.read());
}
}
Debug Messages
'class SoftwareSerial' has no member named 'overflow'
'class SoftwareSerial' has no member named 'end'
etc.
@nanofortran This is a good enhancement for compatibility, but SoftwareSerial is not hosted in this repo. It is hosted here . Could you please open the issue in that repo? Closing.