[SX126x] Explicitly enabled CRC (#706)
This commit is contained in:
parent
c3de8b9099
commit
9dae818033
1 changed files with 8 additions and 5 deletions
|
@ -73,6 +73,12 @@ int16_t SX126x::begin(uint8_t cr, uint8_t syncWord, uint16_t preambleLength, flo
|
||||||
state = setPreambleLength(preambleLength);
|
state = setPreambleLength(preambleLength);
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
|
if (useRegulatorLDO) {
|
||||||
|
state = setRegulatorLDO();
|
||||||
|
} else {
|
||||||
|
state = setRegulatorDCDC();
|
||||||
|
}
|
||||||
|
|
||||||
// set publicly accessible settings that are not a part of begin method
|
// set publicly accessible settings that are not a part of begin method
|
||||||
state = setCurrentLimit(60.0);
|
state = setCurrentLimit(60.0);
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
@ -80,11 +86,8 @@ int16_t SX126x::begin(uint8_t cr, uint8_t syncWord, uint16_t preambleLength, flo
|
||||||
state = setDio2AsRfSwitch(true);
|
state = setDio2AsRfSwitch(true);
|
||||||
RADIOLIB_ASSERT(state);
|
RADIOLIB_ASSERT(state);
|
||||||
|
|
||||||
if (useRegulatorLDO) {
|
state = setCRC(2);
|
||||||
state = setRegulatorLDO();
|
RADIOLIB_ASSERT(state);
|
||||||
} else {
|
|
||||||
state = setRegulatorDCDC();
|
|
||||||
}
|
|
||||||
|
|
||||||
return(state);
|
return(state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue