Re: uBITX AGC - Adafruit TPA2016, A Success! #ubitx

Nick VK4PP
 

in .h file:
void setNoiseGateThreshold(uint8_t thresh);

in .cpp file
void Adafruit_TPA2016::setNoiseGateThreshold(uint8_t thresh){ //Added by VK4PLN
if (thresh > 3) return; // max threshold is 3 (20mV)
 
uint8_t agc = read8(TPA2016_AGCLIMIT);
  
  agc &= ~(0x20);  // mask off bottom 5 bits
  agc |= thresh;        // set the limit level.
 
  write8(TPA2016_AGCLIMIT, agc);
}

73

Join BITX20@groups.io to automatically receive all group messages.