RadioLib Universal wireless communication library for Arduino

RTTY.h
1 #if !defined(_RADIOLIB_RTTY_H)
2 #define _RADIOLIB_RTTY_H
3
4 #include "../../TypeDef.h"
5
6 #if !RADIOLIB_EXCLUDE_RTTY
7
8 #include "../PhysicalLayer/PhysicalLayer.h"
9 #include "../AFSK/AFSK.h"
10 #include "../Print/Print.h"
11 #include "../Print/ITA2String.h"
12
17 class RTTYClient: public RadioLibPrint {
18 public:
23 explicit RTTYClient(PhysicalLayer* phy);
24
25 #if !RADIOLIB_EXCLUDE_AFSK
30 explicit RTTYClient(AFSKClient* audio);
31 #endif
32
33 // basic methods
34
44 int16_t begin(float base, uint32_t shift, uint16_t rate, uint8_t enc = RADIOLIB_ASCII, uint8_t stopBits = 1);
45
49 void idle();
50
55 int16_t standby();
56
62 size_t write(uint8_t b);
63
64 #if !RADIOLIB_GODMODE
65 private:
66 #endif
67 PhysicalLayer* phyLayer;
68 #if !RADIOLIB_EXCLUDE_AFSK
69 AFSKClient* audioClient;
70 #endif
71
72 uint32_t baseFreq = 0, baseFreqHz = 0;
73 uint32_t shiftFreq = 0, shiftFreqHz = 0;
74 uint32_t bitDuration = 0;
75 uint8_t stopBitsNum = 0;
76
77 void mark();
78 void space();
79
80 int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0);
81 };
82
83 #endif
84
85 #endif
AFSKClient
Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direc...
Definition: AFSK.h:16
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:54
RTTYClient
Client for RTTY communication. The public interface is the same as Arduino Serial.
Definition: RTTY.h:17
RTTYClient::write
size_t write(uint8_t b)
Write one byte. Implementation of interface of the RadioLibPrint/Print class.
Definition: RTTY.cpp:59
RTTYClient::standby
int16_t standby()
Stops transmitting.
Definition: RTTY.cpp:115
RTTYClient::idle
void idle()
Send out idle condition (RF tone at mark frequency).
Definition: RTTY.cpp:55
RTTYClient::begin
int16_t begin(float base, uint32_t shift, uint16_t rate, uint8_t enc=RADIOLIB_ASCII, uint8_t stopBits=1)
Initialization method.
Definition: RTTY.cpp:23
RTTYClient::RTTYClient
RTTYClient(PhysicalLayer *phy)
Constructor for 2-FSK mode.
Definition: RTTY.cpp:7
RadioLibPrint
Printing class, based on Arduino Print class with additional encodings.
Definition: Print.h:17