Add receiver gain compilation options

This commit is contained in:
Andy CA6JAU 2018-07-17 00:17:06 -04:00
parent 6729d23b78
commit 46ba5cc4f7
15 changed files with 141 additions and 3 deletions

View file

@ -525,7 +525,15 @@ void CIO::ifConf(MMDVM_STATE modemState, bool reset)
Send_AD7021_control();
// AGC (auto, defaults) (9)
AD7021_control_word = 0x000231E9;
#if defined(AD7021_GAIN_AUTO)
AD7021_control_word = 0x000231E9; // AGC ON, normal operation
#elif defined(AD7021_GAIN_AUTO_LIN)
AD7021_control_word = 0x100231E9; // AGC ON, LNA high linearity
#elif defined(AD7021_GAIN_LOW)
AD7021_control_word = 0x120631E9; // AGC OFF, low gain, LNA high linearity
#elif defined(AD7021_GAIN_HIGH)
AD7021_control_word = 0x00A631E9; // AGC OFF, high gain
#endif
Send_AD7021_control();
// AFC (10)