listenModeSleep():AVR only, remove promiscuous()

This commit is contained in:
Felix Rusu 2020-05-22 12:20:48 -04:00
parent bf543c6651
commit d3c706cc9a
2 changed files with 6 additions and 7 deletions

View File

@ -26,7 +26,9 @@
#include "RFM69.h"
#include "RFM69registers.h"
#include <SPI.h>
#include <LowPower.h> //http://github.com/LowPowerLab/LowPower
#if defined(__AVR__)
#include <LowPower.h> //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
}
//=============================================================================

View File

@ -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();