kopia lustrzana https://github.com/jgromes/RadioLib
SX1278::setOokThresholdType()
rodzic
b1c98569ea
commit
2a01f0785e
|
@ -836,6 +836,19 @@ int16_t SX127x::disableAddressFiltering() {
|
|||
return(_mod->SPIsetRegValue(SX127X_REG_BROADCAST_ADRS, 0x00));
|
||||
}
|
||||
|
||||
int16_t SX127x::setOokThresholdType(uint8_t type) {
|
||||
// check active modem
|
||||
if(getActiveModem() != SX127X_FSK_OOK) {
|
||||
return(ERR_WRONG_MODEM);
|
||||
}
|
||||
|
||||
int16_t state = ERR_NONE;
|
||||
state = _mod->SPIsetRegValue(SX127X_REG_OOK_PEAK, type, 4, 3, 5);
|
||||
|
||||
return(state);
|
||||
}
|
||||
|
||||
|
||||
int16_t SX127x::setOOK(bool enableOOK) {
|
||||
// check active modem
|
||||
if(getActiveModem() != SX127X_FSK_OOK) {
|
||||
|
|
|
@ -859,6 +859,16 @@ class SX127x: public PhysicalLayer {
|
|||
*/
|
||||
int16_t setOOK(bool enableOOK);
|
||||
|
||||
/*!
|
||||
\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
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setOokThresholdType(uint8_t type);
|
||||
|
||||
|
||||
/*!
|
||||
\brief Query modem for the packet length of received payload.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue