[CC1101] Added bitrate caching.
This commit is contained in:
parent
c1e4be41b0
commit
1da981a7cd
2 changed files with 7 additions and 1 deletions
|
@ -401,7 +401,12 @@ int16_t CC1101::setBitRate(float br) {
|
||||||
// set bit rate value
|
// set bit rate value
|
||||||
int16_t state = SPIsetRegValue(CC1101_REG_MDMCFG4, e, 3, 0);
|
int16_t state = SPIsetRegValue(CC1101_REG_MDMCFG4, e, 3, 0);
|
||||||
state |= SPIsetRegValue(CC1101_REG_MDMCFG3, m);
|
state |= SPIsetRegValue(CC1101_REG_MDMCFG3, m);
|
||||||
return(state);
|
|
||||||
|
if (state == ERR_NONE) {
|
||||||
|
_br = br;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (state);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t CC1101::setRxBandwidth(float rxBw) {
|
int16_t CC1101::setRxBandwidth(float rxBw) {
|
||||||
|
|
|
@ -871,6 +871,7 @@ class CC1101: public PhysicalLayer {
|
||||||
Module* _mod;
|
Module* _mod;
|
||||||
|
|
||||||
float _freq;
|
float _freq;
|
||||||
|
float _br;
|
||||||
uint8_t _rawRSSI;
|
uint8_t _rawRSSI;
|
||||||
uint8_t _rawLQI;
|
uint8_t _rawLQI;
|
||||||
uint8_t _modulation;
|
uint8_t _modulation;
|
||||||
|
|
Loading…
Add table
Reference in a new issue