MCPcopy Create free account
hub / github.com/LowPowerLab/RFM69 / readRSSI

Method readRSSI

RFM69.cpp:530–540  ·  view source on GitHub ↗

get the received signal strength indicator (RSSI)

Source from the content-addressed store, hash-verified

528
529// get the received signal strength indicator (RSSI)
530int16_t RFM69::readRSSI(bool forceTrigger) {
531 int16_t rssi = 0;
532 if (forceTrigger) {
533 // RSSI trigger not needed if DAGC is in continuous mode
534 writeReg(REG_RSSICONFIG, RF_RSSI_START);
535 while ((readReg(REG_RSSICONFIG) & RF_RSSI_DONE) == 0x00); // wait for RSSI_Ready
536 }
537 rssi = -readReg(REG_RSSIVALUE);
538 rssi >>= 1;
539 return rssi;
540}
541
542uint8_t RFM69::readReg(uint8_t addr) {
543 select();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected