add set300KBPS()
This commit is contained in:
parent
b7ee0b32b0
commit
adee271304
15
RFM69.cpp
15
RFM69.cpp
|
|
@ -888,6 +888,21 @@ void RFM69::rcCalibration()
|
||||||
while ((readReg(REG_OSC1) & RF_OSC1_RCCAL_DONE) == 0x00);
|
while ((readReg(REG_OSC1) & RF_OSC1_RCCAL_DONE) == 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===================================================================================================================
|
||||||
|
// radio300KBPS() - switch radio to max bitrate
|
||||||
|
//===================================================================================================================
|
||||||
|
void RFM69::set300KBPS() {
|
||||||
|
writeReg(0x03, 0x00); //REG_BITRATEMSB: 300kbps (0x006B, see DS p20)
|
||||||
|
writeReg(0x04, 0x6B); //REG_BITRATELSB: 300kbps (0x006B, see DS p20)
|
||||||
|
writeReg(0x19, 0x40); //REG_RXBW: 500kHz
|
||||||
|
writeReg(0x1A, 0x80); //REG_AFCBW: 500kHz
|
||||||
|
writeReg(0x05, 0x13); //REG_FDEVMSB: 300khz (0x1333)
|
||||||
|
writeReg(0x06, 0x33); //REG_FDEVLSB: 300khz (0x1333)
|
||||||
|
writeReg(0x29, 240); //set REG_RSSITHRESH to -120dBm
|
||||||
|
writeReg(0x37, 0b10010000); //DC=WHITENING, CRCAUTOOFF=0
|
||||||
|
// ** DC: 00 none, 01 manchester, 10, whitening
|
||||||
|
}
|
||||||
|
|
||||||
// ListenMode sleep/timer - see ListenModeSleep example for proper usage!
|
// ListenMode sleep/timer - see ListenModeSleep example for proper usage!
|
||||||
void RFM69::listenModeSleep(uint16_t millisInterval)
|
void RFM69::listenModeSleep(uint16_t millisInterval)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
1
RFM69.h
1
RFM69.h
|
|
@ -224,6 +224,7 @@ class RFM69 {
|
||||||
void sleep();
|
void sleep();
|
||||||
uint8_t readTemperature(uint8_t calFactor=0); // get CMOS temperature (8bit)
|
uint8_t readTemperature(uint8_t calFactor=0); // get CMOS temperature (8bit)
|
||||||
void rcCalibration(); // calibrate the internal RC oscillator for use in wide temperature variations - see datasheet section [4.3.5. RC Timer Accuracy]
|
void rcCalibration(); // calibrate the internal RC oscillator for use in wide temperature variations - see datasheet section [4.3.5. RC Timer Accuracy]
|
||||||
|
void set300KBPS();
|
||||||
|
|
||||||
// allow hacking registers by making these public
|
// allow hacking registers by making these public
|
||||||
uint8_t readReg(uint8_t addr);
|
uint8_t readReg(uint8_t addr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue