RadioLib Universal wireless communication library for Arduino

FSK4.h
1 #if !defined(_RADIOLIB_FSK4_H)
2 #define _RADIOLIB_FSK4_H
3
4 #include "../../TypeDef.h"
5
6 #if !RADIOLIB_EXCLUDE_FSK4
7
8 #include "../PhysicalLayer/PhysicalLayer.h"
9 #include "../AFSK/AFSK.h"
10
15 class FSK4Client {
16 public:
21 explicit FSK4Client(PhysicalLayer* phy);
22
23 #if !RADIOLIB_EXCLUDE_AFSK
28 explicit FSK4Client(AFSKClient* audio);
29 #endif
30
31 // basic methods
32
41 int16_t begin(float base, uint32_t shift, uint16_t rate);
42
46 void idle();
47
54 int16_t setCorrection(int16_t offsets[4], float length = 1.0f);
55
62 size_t write(uint8_t* buff, size_t len);
63
69 size_t write(uint8_t b);
70
75 int16_t standby();
76
77 #if !RADIOLIB_GODMODE
78 private:
79 #endif
80 PhysicalLayer* phyLayer;
81 #if !RADIOLIB_EXCLUDE_AFSK
82 AFSKClient* audioClient;
83 #endif
84
85 uint32_t baseFreq = 0, baseFreqHz = 0;
86 uint32_t shiftFreq = 0, shiftFreqHz = 0;
87 uint32_t bitDuration = 0;
88 uint32_t tones[4];
89 uint32_t tonesHz[4];
90
91 void tone(uint8_t i);
92
93 int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
94 int32_t getRawShift(int32_t shift);
95 };
96
97 #endif
98
99 #endif
AFSKClient
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:16
FSK4Client
Client for FSK-4 communication. The public interface is the same as Arduino Serial.
Definition: FSK4.h:15
FSK4Client::begin
int16_t begin(float base, uint32_t shift, uint16_t rate)
Initialization method.
Definition: FSK4.cpp:19
FSK4Client::FSK4Client
FSK4Client(PhysicalLayer *phy)
Constructor for FSK-4 mode.
Definition: FSK4.cpp:5
FSK4Client::idle
void idle()
Send out idle condition (RF tone at mark frequency).
Definition: FSK4.cpp:43
FSK4Client::standby
int16_t standby()
Stop transmitting.
Definition: FSK4.cpp:98
FSK4Client::write
size_t write(uint8_t *buff, size_t len)
Transmit binary data.
Definition: FSK4.cpp:57
FSK4Client::setCorrection
int16_t setCorrection(int16_t offsets[4], float length=1.0f)
Set correction coefficients for frequencies and tone length.
Definition: FSK4.cpp:48
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:54