RF69 - Updated comments
This commit is contained in:
parent
342091b018
commit
f7d0fcfb76
4 changed files with 29 additions and 15 deletions
|
@ -18,6 +18,11 @@ void setup() {
|
|||
|
||||
// initialize RF69 with default settings
|
||||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// output power: 13 dBm
|
||||
byte state = rf.begin();
|
||||
if(state == ERR_NONE) {
|
||||
Serial.println(F("success!"));
|
||||
|
|
|
@ -19,6 +19,11 @@ void setup() {
|
|||
|
||||
// initialize RF69 with default settings
|
||||
Serial.print(F("[RF69] Initializing ... "));
|
||||
// carrier frequency: 434.0 MHz
|
||||
// bit rate: 48.0 kbps
|
||||
// Rx bandwidth: 125.0 kHz
|
||||
// frequency deviation: 50.0 kHz
|
||||
// output power: 13 dBm
|
||||
byte state = rf.begin();
|
||||
if(state == ERR_NONE) {
|
||||
Serial.println(F("success!"));
|
||||
|
|
|
@ -155,10 +155,12 @@ uint8_t RF69::receive(Packet& pack) {
|
|||
}
|
||||
|
||||
uint8_t RF69::sleep() {
|
||||
// set module to sleep
|
||||
return(setMode(RF69_SLEEP));
|
||||
}
|
||||
|
||||
uint8_t RF69::standby() {
|
||||
// set module to standby
|
||||
return(setMode(RF69_STANDBY));
|
||||
}
|
||||
|
||||
|
|
|
@ -418,15 +418,17 @@
|
|||
|
||||
class RF69 {
|
||||
public:
|
||||
// constructor
|
||||
RF69(Module* module);
|
||||
|
||||
// basic methods
|
||||
uint8_t begin(float freq = 434.0, float br = 48.0, float rxBw = 125.0, float freqDev = 50.0, int8_t power = 13);
|
||||
uint8_t transmit(Packet& pack);
|
||||
uint8_t receive(Packet& pack);
|
||||
|
||||
uint8_t sleep();
|
||||
uint8_t standby();
|
||||
|
||||
// setting methods
|
||||
uint8_t setFrequency(float freq);
|
||||
uint8_t setBitRate(float br);
|
||||
uint8_t setRxBandwidth(float rxBw);
|
||||
|
|
Loading…
Add table
Reference in a new issue