SX1278::setOokThresholdType()

pull/274/head
Christophe Painchaud 2021-03-17 00:43:35 +01:00
rodzic b1c98569ea
commit 2a01f0785e
2 zmienionych plików z 23 dodań i 0 usunięć

Wyświetl plik

@ -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) {

Wyświetl plik

@ -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.