fixed typos
This commit is contained in:
parent
6c4ea1e1c4
commit
b8a623a134
3 changed files with 14 additions and 14 deletions
|
@ -493,7 +493,7 @@ int16_t CC1101::setRxBandwidth(float rxBw) {
|
|||
//return(SPIsetRegValue(RADIOLIB_CC1101_REG_MDMCFG4, (e << 6) | (m << 4), 7, 4));
|
||||
uint16_t state = SPIsetRegValue(RADIOLIB_CC1101_REG_MDMCFG4, (e << 6) | (m << 4), 7, 4);
|
||||
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
_rxBw = rxBw;
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ int16_t CC1101::setFrequencyDeviation(float freqDev) {
|
|||
int16_t state = SPIsetRegValue(RADIOLIB_CC1101_REG_DEVIATN, (e << 4), 6, 4);
|
||||
state |= SPIsetRegValue(RADIOLIB_CC1101_REG_DEVIATN, m, 2, 0);
|
||||
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
_freqDev = freqDev;
|
||||
}
|
||||
|
||||
|
@ -676,8 +676,8 @@ int16_t CC1101::setPreambleLength(uint8_t preambleLength) {
|
|||
|
||||
|
||||
//return SPIsetRegValue(RADIOLIB_CC1101_REG_MDMCFG1, value, 6, 4);
|
||||
uint16_t state = SPIsetRegValue(CC1101_REG_MDMCFG1, value, 6, 4);
|
||||
if(state == ERR_NONE) {
|
||||
uint16_t state = SPIsetRegValue(RADIOLIB_CC1101_REG_MDMCFG1, value, 6, 4);
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
_preambleLen = preambleLength;
|
||||
}
|
||||
|
||||
|
|
|
@ -608,7 +608,7 @@ int16_t RF69::setFrequencyDeviation(float freqDev) {
|
|||
uint32_t fdev = (newFreqDev * (base << 19)) / 32000;
|
||||
int16_t state = _mod->SPIsetRegValue(RADIOLIB_RF69_REG_FDEV_MSB, (fdev & 0xFF00) >> 8, 5, 0);
|
||||
state |= _mod->SPIsetRegValue(RADIOLIB_RF69_REG_FDEV_LSB, fdev & 0x00FF, 7, 0);
|
||||
if (state == ERR_NONE) {
|
||||
if (state == RADIOLIB_ERR_NONE) {
|
||||
_freqDev = freqDev;
|
||||
}
|
||||
|
||||
|
@ -674,7 +674,7 @@ int16_t RF69::setSyncWord(uint8_t* syncWord, size_t len, uint8_t maxErrBits) {
|
|||
// set sync word register
|
||||
_mod->SPIwriteRegisterBurst(RADIOLIB_RF69_REG_SYNC_VALUE_1, syncWord, len);
|
||||
//return(RADIOLIB_ERR_NONE);
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
_syncWordLength = len;
|
||||
}
|
||||
|
||||
|
@ -690,9 +690,9 @@ int16_t RF69::setPreambleLength(uint8_t preambleLen) {
|
|||
uint8_t preLenBytes = preambleLen / 8;
|
||||
_mod->SPIwriteRegister(RADIOLIB_RF69_REG_PREAMBLE_MSB, 0x00);
|
||||
//return(_mod->SPIsetRegValue(RADIOLIB_RF69_REG_PREAMBLE_LSB, preLenBytes));
|
||||
uint16_t state = _mod->SPIsetRegValue(RF69_REG_PREAMBLE_LSB, preLenBytes);
|
||||
uint16_t state = _mod->SPIsetRegValue(RADIOLIB_RF69_REG_PREAMBLE_LSB, preLenBytes);
|
||||
|
||||
if (state == ERR_NONE) {
|
||||
if (state == RADIOLIB_ERR_NONE) {
|
||||
_preambleLen = preambleLen;
|
||||
}
|
||||
|
||||
|
@ -837,7 +837,7 @@ int16_t RF69::setPromiscuousMode(bool promiscuous) {
|
|||
// enable CRC filtering
|
||||
state = setCrcFiltering(true);
|
||||
}
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
_promiscuous = promiscuous;
|
||||
}
|
||||
|
||||
|
|
|
@ -252,9 +252,9 @@ int16_t nRF24::setFrequency(int16_t freq) {
|
|||
// set frequency
|
||||
uint8_t freqRaw = freq - 2400;
|
||||
//return(_mod->SPIsetRegValue(RADIOLIB_NRF24_REG_RF_CH, freqRaw, 6, 0));
|
||||
uint16_t state = _mod->SPIsetRegValue(NRF24_REG_RF_CH, freqRaw, 6, 0);
|
||||
uint16_t state = _mod->SPIsetRegValue(RADIOLIB_NRF24_REG_RF_CH, freqRaw, 6, 0);
|
||||
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
_freq = freq;
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ int16_t nRF24::setDataRate(int16_t dataRate) {
|
|||
return(RADIOLIB_ERR_INVALID_DATA_RATE);
|
||||
}
|
||||
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
_dataRate = dataRate;
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,7 @@ int16_t nRF24::setOutputPower(int8_t power) {
|
|||
// write new register value
|
||||
state = _mod->SPIsetRegValue(RADIOLIB_NRF24_REG_RF_SETUP, powerRaw, 2, 1);
|
||||
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
_power = power;
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ int16_t nRF24::setAddressWidth(uint8_t addrWidth) {
|
|||
|
||||
// save address width
|
||||
//_addrWidth = addrWidth;
|
||||
if(state == ERR_NONE) {
|
||||
if(state == RADIOLIB_ERR_NONE) {
|
||||
_addrWidth = addrWidth;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue