From 32a80592e243848b79280430e503ac522875b65f Mon Sep 17 00:00:00 2001 From: Felix Rusu Date: Tue, 15 Jan 2019 19:29:39 -0500 Subject: [PATCH] Remove volatiles per issue #115 --- RFM69.cpp | 18 +++++++++--------- RFM69.h | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/RFM69.cpp b/RFM69.cpp index 9faa6ed..3f15e1e 100644 --- a/RFM69.cpp +++ b/RFM69.cpp @@ -27,15 +27,15 @@ #include #include -volatile uint8_t RFM69::DATA[RF69_MAX_DATA_LEN]; -volatile uint8_t RFM69::_mode; // current transceiver state -volatile uint8_t RFM69::DATALEN; -volatile uint8_t RFM69::SENDERID; -volatile uint8_t RFM69::TARGETID; // should match _address -volatile uint8_t RFM69::PAYLOADLEN; -volatile uint8_t RFM69::ACK_REQUESTED; -volatile uint8_t RFM69::ACK_RECEIVED; // should be polled immediately after sending a packet with ACK request -volatile int16_t RFM69::RSSI; // most accurate RSSI during reception (closest to the reception) +uint8_t RFM69::DATA[RF69_MAX_DATA_LEN]; +uint8_t RFM69::_mode; // current transceiver state +uint8_t RFM69::DATALEN; +uint8_t RFM69::SENDERID; +uint8_t RFM69::TARGETID; // should match _address +uint8_t RFM69::PAYLOADLEN; +uint8_t RFM69::ACK_REQUESTED; +uint8_t RFM69::ACK_RECEIVED; // should be polled immediately after sending a packet with ACK request +int16_t RFM69::RSSI; // most accurate RSSI during reception (closest to the reception) volatile bool RFM69::_haveData; RFM69* RFM69::selfPointer; diff --git a/RFM69.h b/RFM69.h index 47cf8c5..f62815d 100644 --- a/RFM69.h +++ b/RFM69.h @@ -162,15 +162,15 @@ class RFM69 { public: - static volatile uint8_t DATA[RF69_MAX_DATA_LEN]; // recv/xmit buf, including header & crc bytes - static volatile uint8_t DATALEN; - static volatile uint8_t SENDERID; - static volatile uint8_t TARGETID; // should match _address - static volatile uint8_t PAYLOADLEN; - static volatile uint8_t ACK_REQUESTED; - static volatile uint8_t ACK_RECEIVED; // should be polled immediately after sending a packet with ACK request - static volatile int16_t RSSI; // most accurate RSSI during reception (closest to the reception). RSSI of last packet. - static volatile uint8_t _mode; // should be protected? + static uint8_t DATA[RF69_MAX_DATA_LEN]; // recv/xmit buf, including header & crc bytes + static uint8_t DATALEN; + static uint8_t SENDERID; + static uint8_t TARGETID; // should match _address + static uint8_t PAYLOADLEN; + static uint8_t ACK_REQUESTED; + static uint8_t ACK_RECEIVED; // should be polled immediately after sending a packet with ACK request + static int16_t RSSI; // most accurate RSSI during reception (closest to the reception). RSSI of last packet. + static uint8_t _mode; // should be protected? RFM69(uint8_t slaveSelectPin, uint8_t interruptPin, bool isRFM69HW, uint8_t interruptNum) //interruptNum is now deprecated : RFM69(slaveSelectPin, interruptPin, isRFM69HW){};