kopia lustrzana https://github.com/jgromes/RadioLib
[nRF24] Added "isCarrierDetected()"
rodzic
1a721715ea
commit
d1586449f4
|
@ -423,6 +423,10 @@ int16_t nRF24::getStatus(uint8_t mask) {
|
|||
return(_mod->SPIgetRegValue(NRF24_REG_STATUS) & mask);
|
||||
}
|
||||
|
||||
bool nRF24::isCarrierDetected() {
|
||||
return(_mod->SPIgetRegValue(NRF24_REG_RPD, 0,0)) == 1;
|
||||
}
|
||||
|
||||
int16_t nRF24::setFrequencyDeviation(float freqDev) {
|
||||
// nRF24 is unable to set frequency deviation
|
||||
// this method is implemented only for PhysicalLayer compatibility
|
||||
|
|
|
@ -392,6 +392,13 @@ class nRF24: public PhysicalLayer {
|
|||
*/
|
||||
int16_t getStatus(uint8_t mask = 0xFF);
|
||||
|
||||
/*!
|
||||
\brief Checks if carrier was detected during last RX
|
||||
|
||||
\returns Whatever the carrier was above threshold.
|
||||
*/
|
||||
bool isCarrierDetected();
|
||||
|
||||
/*!
|
||||
\brief Dummy configuration method, to ensure PhysicalLayer compatibility.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue