diff options
author | Dave Madison <dmadison@users.noreply.github.com> | 2020-02-01 05:46:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-01 05:46:15 -0500 |
commit | 924299c159b619852d4c5eb1fc106db8a459d661 (patch) | |
tree | 39aad14af9ba55cc9f26f2920f6ff873552f4c62 /libraries/SoftwareSerial/src | |
parent | 59dd6085ec8ec0a5438c1019e982fefb77f485d3 (diff) | |
parent | 923b4441fed740c5ff1e42bb8f2f58ea87d4eaf7 (diff) |
Merge pull request #6 from dmadison/upstream-updatesv1.0.1
Arduino Core 1.8.2
Diffstat (limited to 'libraries/SoftwareSerial/src')
-rw-r--r-- | libraries/SoftwareSerial/src/SoftwareSerial.cpp | 4 | ||||
-rw-r--r-- | libraries/SoftwareSerial/src/SoftwareSerial.h | 9 |
2 files changed, 2 insertions, 11 deletions
diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.cpp b/libraries/SoftwareSerial/src/SoftwareSerial.cpp index 474fe4a..3163d7a 100644 --- a/libraries/SoftwareSerial/src/SoftwareSerial.cpp +++ b/libraries/SoftwareSerial/src/SoftwareSerial.cpp @@ -316,7 +316,7 @@ void SoftwareSerial::begin(long speed) _tx_delay = subtract_cap(bit_delay, 15 / 4);
// Only setup rx when we have a valid PCINT for this pin
- if (digitalPinToPCICR(_receivePin)) {
+ if (digitalPinToPCICR((int8_t)_receivePin)) {
#if GCC_VERSION > 40800
// Timings counted from gcc 4.8.2 output. This works up to 115200 on
// 16Mhz and 57600 on 8Mhz.
@@ -357,7 +357,7 @@ void SoftwareSerial::begin(long speed) // Enable the PCINT for the entire port here, but never disable it
// (others might also need it, so we disable the interrupt by using
// the per-pin PCMSK register).
- *digitalPinToPCICR(_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));
+ *digitalPinToPCICR((int8_t)_receivePin) |= _BV(digitalPinToPCICRbit(_receivePin));
// Precalculate the pcint mask register and value, so setRxIntMask
// can be used inside the ISR without costing too much time.
_pcint_maskreg = digitalPinToPCMSK(_receivePin);
diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.h b/libraries/SoftwareSerial/src/SoftwareSerial.h index b1a37c4..d8b88ce 100644 --- a/libraries/SoftwareSerial/src/SoftwareSerial.h +++ b/libraries/SoftwareSerial/src/SoftwareSerial.h @@ -111,13 +111,4 @@ public: static inline void handle_interrupt() __attribute__((__always_inline__));
};
-// Arduino 0012 workaround
-#undef int
-#undef char
-#undef long
-#undef byte
-#undef float
-#undef abs
-#undef round
-
#endif
|