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

Method setLNA

RFM69.cpp:1008–1013  ·  view source on GitHub ↗

============================================================================= setLNA() - disable the AGC and set a manual gain to attenuate input signal Makes receiver hear a "weaker" signal. Use this function to simulate a receiver "distance" from a transmitter newReg should be: (see table 26 RegLna 0x18 values) 000 - gain set by the internal AGC loop (when bits 001 - G1 = highest gain 010 - G2 =

Source from the content-addressed store, hash-verified

1006// 111 - reserved
1007//=============================================================================
1008uint8_t RFM69::setLNA(uint8_t newReg) {
1009 byte oldReg;
1010 oldReg = readReg(REG_LNA);
1011 writeReg(REG_LNA, ((newReg & 7) | (oldReg & ~7))); // just control the LNA Gain bits for now
1012 return oldReg; // return the original value in case we need to restore it
1013}
1014
1015// ListenMode sleep/timer - see ListenModeSleep example for proper usage!
1016void RFM69::listenModeSleep(uint16_t millisInterval) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected