Add enableOOK param to RF69::begin, false by default, mirrors SX127x
This commit is contained in:
parent
361eba8ebc
commit
2b99b6ec86
2 changed files with 6 additions and 2 deletions
|
@ -9,7 +9,7 @@ Module* RF69::getMod() {
|
|||
return(_mod);
|
||||
}
|
||||
|
||||
int16_t RF69::begin(float freq, float br, float freqDev, float rxBw, int8_t power, uint8_t preambleLen) {
|
||||
int16_t RF69::begin(float freq, float br, float freqDev, float rxBw, int8_t power, uint8_t preambleLen, bool enableOOK) {
|
||||
// set module properties
|
||||
_mod->init();
|
||||
_mod->pinMode(_mod->getIrq(), INPUT);
|
||||
|
@ -54,6 +54,10 @@ int16_t RF69::begin(float freq, float br, float freqDev, float rxBw, int8_t powe
|
|||
int16_t state = config();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// enable/disable OOK
|
||||
state = setOOK(enableOOK);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// configure publicly accessible settings
|
||||
state = setFrequency(freq);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
|
|
@ -473,7 +473,7 @@ class RF69: public PhysicalLayer {
|
|||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t begin(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint8_t preambleLen = 16);
|
||||
int16_t begin(float freq = 434.0, float br = 4.8, float freqDev = 5.0, float rxBw = 125.0, int8_t power = 10, uint8_t preambleLen = 16, bool enableOOK = false);
|
||||
|
||||
/*!
|
||||
\brief Reset method. Will reset the chip to the default state using RST pin.
|
||||
|
|
Loading…
Add table
Reference in a new issue