diff --git a/RFM69.cpp b/RFM69.cpp index bd3b3a2..259d9cd 100644 --- a/RFM69.cpp +++ b/RFM69.cpp @@ -26,7 +26,9 @@ #include "RFM69.h" #include "RFM69registers.h" #include -#include //http://github.com/LowPowerLab/LowPower +#if defined(__AVR__) + #include //http://github.com/LowPowerLab/LowPower +#endif uint8_t RFM69::DATA[RF69_MAX_DATA_LEN+1]; uint8_t RFM69::_mode; // current transceiver state @@ -515,11 +517,6 @@ void RFM69::spyMode(bool onOff) { //writeReg(REG_PACKETCONFIG1, (readReg(REG_PACKETCONFIG1) & 0xF9) | (onOff ? RF_PACKET1_ADRSFILTERING_OFF : RF_PACKET1_ADRSFILTERING_NODEBROADCAST)); } -void RFM69::promiscuous(bool onOff) { - #pragma message ("\nRFM69::promiscuous(bool): DEPRECATED, use spyMode(bool) instead!\n") - spyMode(onOff); -} - // for RFM69HW only: you must call setHighPower(true) after initialize() or else transmission won't work void RFM69::setHighPower(bool onOff) { _isRFM69HW = onOff; @@ -868,6 +865,7 @@ void RFM69::rcCalibration() // ListenMode sleep/timer void RFM69::listenModeSleep(uint16_t millisInterval) { +#if defined (__AVR__) setMode( RF69_MODE_STANDBY ); while ((readReg(REG_IRQFLAGS1) & RF_IRQFLAGS1_MODEREADY) == 0x00); // wait for ModeReady @@ -912,6 +910,7 @@ void RFM69::listenModeSleep(uint16_t millisInterval) LowPower.powerDown( SLEEP_FOREVER, ADC_OFF, BOD_OFF ); endListenModeSleep(); +#endif } //============================================================================= diff --git a/RFM69.h b/RFM69.h index 885f25a..8673372 100644 --- a/RFM69.h +++ b/RFM69.h @@ -215,7 +215,7 @@ class RFM69 { void setCS(uint8_t newSPISlaveSelect); int16_t readRSSI(bool forceTrigger=false); // *current* signal strength indicator; e.g. < -90dBm says the frequency channel is free + ready to transmit void spyMode(bool onOff=true); - void promiscuous(bool onOff=true); //deprecated, replaced with spyMode() + //void promiscuous(bool onOff=true); //replaced with spyMode() virtual void setHighPower(bool onOFF=true); // has to be called after initialize() for RFM69HW virtual void setPowerLevel(uint8_t level); // reduce/increase transmit power level void sleep();