Fixed SoftwareSerial for ESP8266 core 2.6.1
This commit is contained in:
parent
37d8b6014b
commit
b873127155
2 changed files with 0 additions and 12 deletions
|
@ -5,11 +5,7 @@ ISerial::ISerial(Module* mod) {
|
|||
}
|
||||
|
||||
void ISerial::begin(long speed) {
|
||||
#if defined(ESP8266)
|
||||
_mod->ModuleSerial->begin(speed, _mod->getRx(), _mod->getTx(), SWSERIAL_8N1);
|
||||
#else
|
||||
_mod->ModuleSerial->begin(speed);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ISerial::listen() {
|
||||
|
|
|
@ -9,9 +9,6 @@ Module::Module(int rx, int tx, HardwareSerial* useSer) {
|
|||
|
||||
#ifdef SOFTWARE_SERIAL_UNSUPPORTED
|
||||
ModuleSerial = useSer;
|
||||
#elif defined(ESP8266)
|
||||
ModuleSerial = new SoftwareSerial();
|
||||
(void)useSer;
|
||||
#else
|
||||
ModuleSerial = new SoftwareSerial(_rx, _tx);
|
||||
(void)useSer;
|
||||
|
@ -39,9 +36,6 @@ Module::Module(int cs, int int0, int int1, int rx, int tx, SPIClass& spi, SPISet
|
|||
|
||||
#ifdef SOFTWARE_SERIAL_UNSUPPORTED
|
||||
ModuleSerial = useSer;
|
||||
#elif defined(ESP8266)
|
||||
ModuleSerial = new SoftwareSerial();
|
||||
(void)useSer;
|
||||
#else
|
||||
ModuleSerial = new SoftwareSerial(_rx, _tx);
|
||||
(void)useSer;
|
||||
|
@ -69,8 +63,6 @@ void Module::init(uint8_t interface, uint8_t gpio) {
|
|||
case USE_UART:
|
||||
#if defined(ESP32)
|
||||
ModuleSerial->begin(baudrate, SERIAL_8N1, _rx, _tx);
|
||||
#elif defined(ESP8266)
|
||||
ModuleSerial->begin(baudrate, _rx, _tx, SWSERIAL_8N1);
|
||||
#else
|
||||
ModuleSerial->begin(baudrate);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue