get the received signal strength indicator (RSSI)
| 528 | |
| 529 | // get the received signal strength indicator (RSSI) |
| 530 | int16_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 | |
| 542 | uint8_t RFM69::readReg(uint8_t addr) { |
| 543 | select(); |
nothing calls this directly
no outgoing calls
no test coverage detected