SX127x::setOokFixedOrFloorThreshold
This commit is contained in:
parent
2a01f0785e
commit
f4fac4c09e
2 changed files with 23 additions and 1 deletions
|
@ -844,10 +844,23 @@ int16_t SX127x::setOokThresholdType(uint8_t type) {
|
|||
|
||||
int16_t state = ERR_NONE;
|
||||
state = _mod->SPIsetRegValue(SX127X_REG_OOK_PEAK, type, 4, 3, 5);
|
||||
|
||||
|
||||
return(state);
|
||||
}
|
||||
|
||||
int16_t SX127x::setOokFixedOrFloorThreshold(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_FIX, value, 7, 0, 5);
|
||||
|
||||
return(state);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int16_t SX127x::setOOK(bool enableOOK) {
|
||||
// check active modem
|
||||
|
|
|
@ -868,6 +868,15 @@ class SX127x: public PhysicalLayer {
|
|||
*/
|
||||
int16_t setOokThresholdType(uint8_t type);
|
||||
|
||||
/*!
|
||||
\brief Fixed threshold for the Data Slicer in OOK mode
|
||||
Floor threshold for the Data Slicer in OOK when Peak mode is used
|
||||
|
||||
\param value (in DB)
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setOokFixedOrFloorThreshold(short int value);
|
||||
|
||||
/*!
|
||||
\brief Query modem for the packet length of received payload.
|
||||
|
|
Loading…
Add table
Reference in a new issue