diff --git a/hardware.hpp b/hardware.hpp index 4cef107..4f8b7b8 100644 --- a/hardware.hpp +++ b/hardware.hpp @@ -376,9 +376,9 @@ class InterruptHardware { protected: static void rxIntHandler() FORCE_INLINE { - auto data = HardwareImpl::rxByteInterrupt(); + const auto data = HardwareImpl::rxByteInterrupt(); - uint8_t tmpHead = (sm_rxBuf.head + 1) % RX_BUFFER_SIZE; + const uint8_t tmpHead = (sm_rxBuf.head + 1) % RX_BUFFER_SIZE; if (tmpHead != sm_rxBuf.tail) { sm_rxBuf.head = tmpHead; @@ -391,7 +391,7 @@ class InterruptHardware { static void dataRegEmptyIntHandler() FORCE_INLINE { if (sm_txBuf.head != sm_txBuf.tail) { - uint8_t tmpTail = (sm_txBuf.tail + 1) % TX_BUFFER_SIZE; + const uint8_t tmpTail = (sm_txBuf.tail + 1) % TX_BUFFER_SIZE; sm_txBuf.tail = tmpTail; HardwareImpl::txByteInterrupt(sm_txBuf.buf[tmpTail]); } else