# RadioLib: src/protocols/ExternalRadio/ExternalRadio.h Source File

ExternalRadio.h
#if !defined(_RADIOLIB_EXTERNAL_RADIO_H)
#define _RADIOLIB_EXTERNAL_RADIO_H
#include "../../TypeDef.h"
#include "../../Module.h"
#if defined(RADIOLIB_BUILD_ARDUINO)
#include "../../ArduinoHal.h"
#endif
#include "../PhysicalLayer/PhysicalLayer.h"
class ExternalRadio: public PhysicalLayer {
public:
#if defined(RADIOLIB_BUILD_ARDUINO)
ExternalRadio(uint32_t pin = RADIOLIB_NC); // cppcheck-suppress noExplicitConstructor
#endif
ExternalRadio(RadioLibHal *hal, uint32_t pin = RADIOLIB_NC); // cppcheck-suppress noExplicitConstructor
ExternalRadio(const ExternalRadio& ext);
ExternalRadio& operator=(const ExternalRadio& ext);
~ExternalRadio();
Module* getMod() override;
int16_t setFrequencyDeviation(float freqDev) override;
int16_t setDataShaping(uint8_t sh) override;
int16_t setEncoding(uint8_t encoding) override;
int16_t transmitDirect(uint32_t frf = 0) override;
private:
Module* mod;
uint32_t prevFrf;
};
#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:44
ExternalRadio::transmitDirect
int16_t transmitDirect(uint32_t frf=0) override
Direct transmission to drive external radio.
Definition: ExternalRadio.cpp:59
ExternalRadio::~ExternalRadio
~ExternalRadio()
Default destructor.
Definition: ExternalRadio.cpp:34
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:49
ExternalRadio::getMod
Module * getMod() override
Method to retrieve pointer to the underlying Module instance.
Definition: ExternalRadio.cpp:40
ExternalRadio::setEncoding
int16_t setEncoding(uint8_t encoding) override
Dummy implementation overriding PhysicalLayer.
Definition: ExternalRadio.cpp:54
ExternalRadio::operator=
ExternalRadio & operator=(const ExternalRadio &ext)
Overload for assignment operator.
Definition: ExternalRadio.cpp:24
Module
Implements all common low-level methods to control the wireless module. Every module class contains o...
Definition: Module.h:65
PhysicalLayer
Provides common interface for protocols that run on LoRa/FSK modules, such as RTTY or LoRaWAN....
Definition: PhysicalLayer.h:135
RadioLibHal
Hardware abstraction library base interface.
Definition: Hal.h:13