diff --git a/rfm69.c b/rfm69.c index 60b2822..17638a5 100644 --- a/rfm69.c +++ b/rfm69.c @@ -93,9 +93,9 @@ // regWrite(BITRATE_MSB, 0x0d); // regWrite(BITRATE_LSB, 0x05); - // RC calibration, must be done in standby mode (default after power on) - regWrite(OSC1, 0x80); - do { } while (!(regRead(OSC1) & 0x40)); + // RC calibration, automatically done at device power-up + // regWrite(OSC1, 0x80); + // do { } while (!(regRead(OSC1) & 0x40)); // PA level (default +13 dBm) regWrite(PA_LEVEL, 0x9f); @@ -115,6 +115,9 @@ // RX_BW during AFC (default) regWrite(AFC_BW, 0x8b); + // RSSI threshold (default, POR 0xff) + regWrite(RSSI_THRESH, 0xe4); + // Preamble size regWrite(PREAMB_MSB, 0x00); regWrite(PREAMB_LSB, 0x0f); diff --git a/rfm69.h b/rfm69.h index 6313909..82c0cc4 100644 --- a/rfm69.h +++ b/rfm69.h @@ -32,6 +32,7 @@ #define DIO_MAP1 0x25 #define DIO_MAP2 0x26 #define IRQ_FLAGS1 0x27 +#define RSSI_THRESH 0x29 #define PREAMB_MSB 0x2c #define PREAMB_LSB 0x2d #define IRQ_FLAGS2 0x28