SX127x::setOokPeakThresholdDecrement
This commit is contained in:
parent
17a2979062
commit
f049a4bc98
2 changed files with 22 additions and 1 deletions
|
@ -860,6 +860,18 @@ int16_t SX127x::setOokFixedOrFloorThreshold(short int value) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
int16_t SX127x::setOokPeakThresholdDecrement(short int value) {
|
||||
// check active modem
|
||||
if(getActiveModem() != SX127X_FSK_OOK) {
|
||||
return(ERR_WRONG_MODEM);
|
||||
}
|
||||
|
||||
int16_t state = ERR_NONE;
|
||||
state = _mod->SPIsetRegValue(SX127X_REG_OOK_AVG, value, 7, 5, 5);
|
||||
|
||||
return(state);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int16_t SX127x::setOOK(bool enableOOK) {
|
||||
|
|
|
@ -862,12 +862,21 @@ class SX127x: public PhysicalLayer {
|
|||
/*!
|
||||
\brief Selects the type of threshold in the OOK data slicer
|
||||
|
||||
\param SX127X_OOK_THRESH_FIXED, SX127X_OOK_THRESH_PEAK(default), SX127X_OOK_THRESH_AVERAGE
|
||||
\param type SX127X_OOK_THRESH_FIXED, SX127X_OOK_THRESH_PEAK(default), SX127X_OOK_THRESH_AVERAGE
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setOokThresholdType(uint8_t type);
|
||||
|
||||
/*!
|
||||
\brief Period of decrement of the RSSI threshold in the OOK demodulator
|
||||
|
||||
\param value use defines SX127X_OOK_PEAK_THRESH_DEC_X_X_CHIP
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setOokPeakThresholdDecrement(short int value);
|
||||
|
||||
/*!
|
||||
\brief Fixed threshold for the Data Slicer in OOK mode
|
||||
Floor threshold for the Data Slicer in OOK when Peak mode is used
|
||||
|
|
Loading…
Add table
Reference in a new issue