new RF69::setOokFixedThreshold()

pull/401/head
Christophe Painchaud 2021-03-29 10:25:29 +02:00
rodzic 5c538f31ea
commit 50055ee52d
3 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -154,7 +154,8 @@ enableAES KEYWORD2
disableAES KEYWORD2
getTemperature KEYWORD2
setAmbientTemperature KEYWORD2
setLnaTestBoost KEYWORD2
setLnaTestBoost KEYWORD2
setOokFixedThreshold KEYWORD2
# CC1101-specific
getLQI KEYWORD2

Wyświetl plik

@ -388,6 +388,10 @@ int16_t RF69::setOokThresholdType(uint8_t type) {
return(_mod->SPIsetRegValue(RF69_REG_OOK_PEAK, type, 7, 3, 5));
}
int16_t RF69::setOokFixedThreshold(uint8_t value) {
return(_mod->SPIsetRegValue(RF69_REG_OOK_FIX, value, 7, 0, 5));
}
int16_t RF69::setFrequency(float freq) {
// check allowed frequency range
if(!(((freq > 290.0) && (freq < 340.0)) ||

Wyświetl plik

@ -757,6 +757,15 @@ class RF69: public PhysicalLayer {
*/
int16_t setOokThresholdType(uint8_t type);
/*!
\brief Fixed threshold for the Data Slicer in OOK mode or floor threshold for the Data Slicer in OOK when Peak mode is used.
\param value Fixed threshold value (in dB) in the OOK demodulator. Used when OokThresType = RF69_OOK_THRESH_FIXED.
\returns \ref status_codes
*/
int16_t setOokFixedThreshold(uint8_t value);
/*!
\brief Set modem in fixed packet length mode.