RadioLib Universal wireless communication library for Arduino

ExternalRadio.h
1 #if !defined(_RADIOLIB_EXTERNAL_RADIO_H)
2 #define _RADIOLIB_EXTERNAL_RADIO_H
3
4 #include "../../TypeDef.h"
5 #include "../../Module.h"
6 #if defined(RADIOLIB_BUILD_ARDUINO)
7 #include "../../ArduinoHal.h"
8 #endif
9
10 #include "../PhysicalLayer/PhysicalLayer.h"
11
16 class ExternalRadio: public PhysicalLayer {
17 public:
18 #if defined(RADIOLIB_BUILD_ARDUINO)
23 ExternalRadio(uint32_t pin = RADIOLIB_NC);
24 #endif
25
31 ExternalRadio(RadioLibHal *hal, uint32_t pin = RADIOLIB_NC);
32
37 Module* getMod();
38
44 int16_t setFrequencyDeviation(float freqDev) override;
45
51 int16_t setDataShaping(uint8_t sh) override;
52
58 int16_t setEncoding(uint8_t encoding) override;
59
66 int16_t transmitDirect(uint32_t frf = 0);
67
68 private:
69 Module* mod;
70 uint32_t prevFrf;
71 };
72
73 #endif
ExternalRadio
Class to interface with external radio hardware.
Definition: ExternalRadio.h:16
ExternalRadio::setFrequencyDeviation
int16_t setFrequencyDeviation(float freqDev) override
Dummy implementation overriding PhysicalLayer.
Definition: ExternalRadio.cpp:21
ExternalRadio::ExternalRadio
ExternalRadio(RadioLibHal *hal, uint32_t pin=RADIOLIB_NC)
Default constructor.
Definition: ExternalRadio.cpp:11
ExternalRadio::setDataShaping
int16_t setDataShaping(uint8_t sh) override
Dummy implementation overriding PhysicalLayer.
Definition: ExternalRadio.cpp:26
ExternalRadio::setEncoding
int16_t setEncoding(uint8_t encoding) override
Dummy implementation overriding PhysicalLayer.
Definition: ExternalRadio.cpp:31
ExternalRadio::getMod
Module * getMod()
Method to retrieve pointer to the underlying Module instance.
Definition: ExternalRadio.cpp:17
ExternalRadio::transmitDirect
int16_t transmitDirect(uint32_t frf=0)
Direct transmission to drive external radio.
Definition: ExternalRadio.cpp:36
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:68
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:54
RadioLibHal
Hardware abstraction library base interface.
Definition: Hal.h:13