kopia lustrzana https://github.com/jgromes/RadioLib
Fix swapped order of operations in finishReceive
rodzic
9c0f1b8c7d
commit
c70ab67044
|
@ -474,12 +474,12 @@ int16_t LR11x0::readData(uint8_t* data, size_t len) {
|
|||
}
|
||||
|
||||
int16_t LR11x0::finishReceive() {
|
||||
// clear interrupt flags
|
||||
int16_t state = clearIrqState(RADIOLIB_LR11X0_IRQ_ALL);
|
||||
// set mode to standby to disable RF switch
|
||||
int16_t state = standby();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// set mode to standby to disable RF switch
|
||||
return(standby());
|
||||
// clear interrupt flags
|
||||
return(clearIrqState(RADIOLIB_LR11X0_IRQ_ALL));
|
||||
}
|
||||
|
||||
int16_t LR11x0::startChannelScan() {
|
||||
|
|
|
@ -485,11 +485,12 @@ int16_t RF69::readData(uint8_t* data, size_t len) {
|
|||
}
|
||||
|
||||
int16_t RF69::finishReceive() {
|
||||
// set mode to standby to disable RF switch
|
||||
int16_t state = standby();
|
||||
|
||||
// clear interrupt flags
|
||||
clearIRQFlags();
|
||||
|
||||
// set mode to standby to disable RF switch
|
||||
return(standby());
|
||||
return(state);
|
||||
}
|
||||
|
||||
int16_t RF69::setOOK(bool enable) {
|
||||
|
|
|
@ -511,8 +511,8 @@ int16_t SX126x::finishTransmit() {
|
|||
}
|
||||
|
||||
int16_t SX126x::finishReceive() {
|
||||
// clear interrupt flags
|
||||
int16_t state = clearIrqStatus();
|
||||
// set mode to standby to disable RF switch
|
||||
int16_t state = standby();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// try to fix timeout error in implicit header mode
|
||||
|
@ -520,8 +520,8 @@ int16_t SX126x::finishReceive() {
|
|||
state = fixImplicitTimeout();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// set mode to standby to disable RF switch
|
||||
return(standby());
|
||||
// clear interrupt flags
|
||||
return(clearIrqStatus());
|
||||
}
|
||||
|
||||
int16_t SX126x::startReceive() {
|
||||
|
|
|
@ -571,12 +571,12 @@ int16_t SX127x::readData(uint8_t* data, size_t len) {
|
|||
}
|
||||
|
||||
int16_t SX127x::finishReceive() {
|
||||
// clear interrupt flags
|
||||
int16_t state = clearIrqFlags(RADIOLIB_SX127X_FLAGS_ALL);
|
||||
// set mode to standby to disable RF switch
|
||||
int16_t state = standby();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// set mode to standby to disable RF switch
|
||||
return(standby());
|
||||
// clear interrupt flags
|
||||
return(clearIrqFlags(RADIOLIB_SX127X_FLAGS_ALL));
|
||||
}
|
||||
|
||||
int16_t SX127x::startChannelScan() {
|
||||
|
|
|
@ -569,12 +569,12 @@ int16_t SX128x::readData(uint8_t* data, size_t len) {
|
|||
}
|
||||
|
||||
int16_t SX128x::finishReceive() {
|
||||
// clear interrupt flags
|
||||
int16_t state = clearIrqStatus();
|
||||
// set mode to standby to disable RF switch
|
||||
int16_t state = standby();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// set mode to standby to disable RF switch
|
||||
return(standby());
|
||||
// clear interrupt flags
|
||||
return(clearIrqStatus());
|
||||
}
|
||||
|
||||
uint32_t SX128x::getIrqFlags() {
|
||||
|
|
|
@ -351,11 +351,12 @@ int16_t Si443x::readData(uint8_t* data, size_t len) {
|
|||
}
|
||||
|
||||
int16_t Si443x::finishReceive() {
|
||||
// set mode to standby to disable RF switch
|
||||
int16_t state = standby();
|
||||
|
||||
// clear interrupt flags
|
||||
clearIrqStatus();
|
||||
|
||||
// set mode to standby to disable RF switch
|
||||
return(standby());
|
||||
return(state);
|
||||
}
|
||||
|
||||
int16_t Si443x::setBitRate(float br) {
|
||||
|
|
Ładowanie…
Reference in New Issue