Cleaned up formatting in header. Changed assigned value to set only the bit indicated in the documentation.
This commit is contained in:
parent
da0cd455c9
commit
ff43d95afa
2 changed files with 7 additions and 7 deletions
|
@ -1057,7 +1057,7 @@ int16_t SX128x::setGainControl(uint8_t gain) {
|
|||
ManualGainSetting |= 0x01; // Set bit 0 to 1 (Enable Automatic Gain Control)
|
||||
LNAGainValue &= 0xF0; // Bits 0, 1, 2 and 3 to 0
|
||||
LNAGainValue |= 0x0A; // Set bits 0, 1, 2 and 3 to Manual Gain Setting (1-13)
|
||||
LNAGainControl = 0x4D; // Set bit 7 to 0 (Enable Automatic Gain Control)
|
||||
LNAGainControl &= ~0x80; // Set bit 7 to 0 (Enable Automatic Gain Control)
|
||||
}
|
||||
state = writeRegister(RADIOLIB_SX128X_REG_MANUAL_GAIN_CONTROL_ENABLE_2, &ManualGainSetting, 1);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
|
|
@ -727,7 +727,7 @@ class SX128x: public PhysicalLayer {
|
|||
|
||||
\param Gain 0 automatic gain; 1 minimum gain to 13 maximum gain.
|
||||
|
||||
\returns \ref status_codes
|
||||
\returns 0
|
||||
*/
|
||||
int16_t setGainControl(uint8_t gain = 0);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue