mirror of
https://github.com/sandeepmistry/arduino-LoRa.git
synced 2025-04-19 13:02:14 +03:00
enable auto AGC
This commit is contained in:
parent
030a396237
commit
c1eb2b70f4
@ -21,6 +21,7 @@
|
|||||||
#define REG_PREAMBLE_MSB 0x20
|
#define REG_PREAMBLE_MSB 0x20
|
||||||
#define REG_PREAMBLE_LSB 0x21
|
#define REG_PREAMBLE_LSB 0x21
|
||||||
#define REG_PAYLOAD_LENGTH 0x22
|
#define REG_PAYLOAD_LENGTH 0x22
|
||||||
|
#define REG_MODEM_CONFIG_3 0x26
|
||||||
#define REG_RSSI_WIDEBAND 0x2c
|
#define REG_RSSI_WIDEBAND 0x2c
|
||||||
#define REG_DETECTION_OPTIMIZE 0x31
|
#define REG_DETECTION_OPTIMIZE 0x31
|
||||||
#define REG_DETECTION_THRESHOLD 0x37
|
#define REG_DETECTION_THRESHOLD 0x37
|
||||||
@ -93,6 +94,9 @@ int LoRaClass::begin(long frequency)
|
|||||||
// set LNA boost
|
// set LNA boost
|
||||||
writeRegister(REG_LNA, readRegister(REG_LNA) | 0x03);
|
writeRegister(REG_LNA, readRegister(REG_LNA) | 0x03);
|
||||||
|
|
||||||
|
// set auto AGC
|
||||||
|
writeRegister(REG_MODEM_CONFIG_3, 0x04);
|
||||||
|
|
||||||
// set output power to 17 dBm
|
// set output power to 17 dBm
|
||||||
setTxPower(17);
|
setTxPower(17);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user