aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2014-05-23 21:04:47 +0200
committerCristian Maglie <c.maglie@bug.st>2014-05-23 21:04:47 +0200
commit2d46a8ef88b5cb52d7d2660b97f7289981a7b32a (patch)
treef58154e6492b6920e8cb6fe667bc3cf5e4af4633
parent6d4273609b2f8d8c71ff30bda6e075f3d50e335a (diff)
parentc16768565b4ea62a06d21fa6d5cb0cbb0af902fa (diff)
Merge remote-tracking branch 'arduino/master' into ide-1.5.x
Conflicts: build/shared/examples/01.Basics/Blink/Blink.ino build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino build/shared/examples/10.StarterKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino hardware/arduino/cores/arduino/HardwareSerial.cpp
-rw-r--r--cores/arduino/HardwareSerial.cpp2
-rw-r--r--libraries/SoftwareSerial/SoftwareSerial.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/cores/arduino/HardwareSerial.cpp b/cores/arduino/HardwareSerial.cpp
index e165136..d96b47f 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);