added RF69::setLnaTestBoost
This commit is contained in:
parent
fc3a4a8175
commit
97cdce7b64
2 changed files with 21 additions and 0 deletions
|
@ -777,6 +777,13 @@ int16_t RF69::setEncoding(uint8_t encoding) {
|
|||
}
|
||||
}
|
||||
|
||||
int16_t RF69::setLnaTestBoost(bool value) {
|
||||
if(value)
|
||||
return(_mod->SPIsetRegValue(RF69_REG_TEST_LNA, RF69_TEST_LNA_BOOST_HIGH, 7, 0));
|
||||
|
||||
return(_mod->SPIsetRegValue(RF69_TEST_LNA_BOOST_NORMAL, RF69_TEST_LNA_BOOST_HIGH, 7, 0));
|
||||
}
|
||||
|
||||
float RF69::getRSSI() {
|
||||
return(-1.0 * (_mod->SPIgetRegValue(RF69_REG_RSSI_VALUE)/2.0));
|
||||
}
|
||||
|
|
|
@ -91,6 +91,7 @@
|
|||
#define RF69_REG_AES_KEY_16 0x4D
|
||||
#define RF69_REG_TEMP_1 0x4E
|
||||
#define RF69_REG_TEMP_2 0x4F
|
||||
#define RF69_REG_TEST_LNA 0x58
|
||||
#define RF69_REG_TEST_PA1 0x5A
|
||||
#define RF69_REG_TEST_PA2 0x5C
|
||||
#define RF69_REG_TEST_DAGC 0x6F
|
||||
|
@ -409,6 +410,10 @@
|
|||
#define RF69_AES_OFF 0b00000000 // 0 0 AES encryption disabled (default)
|
||||
#define RF69_AES_ON 0b00000001 // 0 0 AES encryption enabled, payload size limited to 66 bytes
|
||||
|
||||
// RF69_REG_TEST_LNA
|
||||
#define RF69_TEST_LNA_BOOST_NORMAL 0x1B // 7 0
|
||||
#define RF69_TEST_LNA_BOOST_HIGH 0x2D // 7 0
|
||||
|
||||
// RF69_REG_TEMP_1
|
||||
#define RF69_TEMP_MEAS_START 0b00001000 // 3 3 trigger temperature measurement
|
||||
#define RF69_TEMP_MEAS_RUNNING 0b00000100 // 2 2 temperature measurement status: on-going
|
||||
|
@ -815,6 +820,15 @@ class RF69: public PhysicalLayer {
|
|||
*/
|
||||
int16_t setEncoding(uint8_t encoding) override;
|
||||
|
||||
/*!
|
||||
\brief enable/disable LNA Boost mode (disabled by default
|
||||
|
||||
\param value true to enable, false to disable
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setLnaTestBoost(bool value);
|
||||
|
||||
/*!
|
||||
\brief Gets RSSI (Recorded Signal Strength Indicator) of the last received packet.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue