diff options
author | Jeff Rowberg <jeff@rowberg.net> | 2019-07-21 21:05:24 -0400 |
---|---|---|
committer | Jeff Rowberg <jeff@rowberg.net> | 2019-07-21 21:05:24 -0400 |
commit | e715ebfdc9b5d1ca5122eda1dac45023727532b1 (patch) | |
tree | 8cfee6a795ee74272bf9b1079d4087921548ab29 /libraries/SoftwareSerial/src | |
parent | 7a2e1cd815266fef3012a5c9b48f88d78551f838 (diff) |
Cast pins to signed integers to avoid Wtype-limits compile warning
Diffstat (limited to 'libraries/SoftwareSerial/src')
-rw-r--r-- | libraries/SoftwareSerial/src/SoftwareSerial.cpp | 4 |
1 files changed, 2 insertions, 2 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);
|