Skip to content

Commit

Permalink
[RF69] Disabled SPI verification when writing frequency regs (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes authored Aug 12, 2020
1 parent db234a1 commit 20193b7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/modules/RF69/RF69.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,10 @@ int16_t RF69::setFrequency(float freq) {

//set carrier frequency
uint32_t FRF = (freq * (uint32_t(1) << RF69_DIV_EXPONENT)) / RF69_CRYSTAL_FREQ;
int16_t state = _mod->SPIsetRegValue(RF69_REG_FRF_MSB, (FRF & 0xFF0000) >> 16, 7, 0);
state |= _mod->SPIsetRegValue(RF69_REG_FRF_MID, (FRF & 0x00FF00) >> 8, 7, 0);
state |= _mod->SPIsetRegValue(RF69_REG_FRF_LSB, FRF & 0x0000FF, 7, 0);

return(state);
_mod->SPIwriteRegister(RF69_REG_FRF_MSB, (FRF & 0xFF0000) >> 16);
_mod->SPIwriteRegister(RF69_REG_FRF_MID, (FRF & 0x00FF00) >> 8);
_mod->SPIwriteRegister(RF69_REG_FRF_LSB, FRF & 0x0000FF);
return(ERR_NONE);
}

int16_t RF69::setBitRate(float br) {
Expand Down

0 comments on commit 20193b7

Please sign in to comment.