[nRF24] Added "isCarrierDetected()"

pull/119/head
Andrea Guglielmini 2020-02-26 15:54:41 +01:00
rodzic 1a721715ea
commit d1586449f4
2 zmienionych plików z 11 dodań i 0 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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.