Remove volatiles per issue #115

This commit is contained in:
Felix Rusu 2019-01-15 19:29:39 -05:00
parent 505add7a29
commit 32a80592e2
2 changed files with 18 additions and 18 deletions

View File

@ -27,15 +27,15 @@
#include <RFM69registers.h>
#include <SPI.h>
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;

18
RFM69.h
View File

@ -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){};