diff options
-rw-r--r-- | cores/arduino/HardwareSerial.cpp | 2 | ||||
-rw-r--r-- | libraries/SoftwareSerial/SoftwareSerial.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp index 95d5fb5..ed29641 100644 --- a/cores/arduino/HardwareSerial.cpp +++ b/cores/arduino/HardwareSerial.cpp @@ -152,7 +152,7 @@ void HardwareSerial::end() int HardwareSerial::available(void) { - return (unsigned int)(SERIAL_RX_BUFFER_SIZE + _rx_buffer_head - _rx_buffer_tail) % SERIAL_RX_BUFFER_SIZE; + return (int)(SERIAL_RX_BUFFER_SIZE + _rx_buffer_head - _rx_buffer_tail) % SERIAL_RX_BUFFER_SIZE; } int HardwareSerial::peek(void) diff --git a/libraries/SoftwareSerial/SoftwareSerial.cpp b/libraries/SoftwareSerial/SoftwareSerial.cpp index 64496fe..d1f6c92 100644 --- a/libraries/SoftwareSerial/SoftwareSerial.cpp +++ b/libraries/SoftwareSerial/SoftwareSerial.cpp @@ -355,7 +355,7 @@ SoftwareSerial::~SoftwareSerial() void SoftwareSerial::setTX(uint8_t tx)
{
pinMode(tx, OUTPUT);
- digitalWrite(tx, HIGH);
+ digitalWrite(tx, _inverse_logic ? LOW : HIGH);
_transmitBitMask = digitalPinToBitMask(tx);
uint8_t port = digitalPinToPort(tx);
_transmitPortRegister = portOutputRegister(port);
|