[Hell] Reworked driver exclusion
This commit is contained in:
parent
fc21a1d501
commit
d032015e31
2 changed files with 12 additions and 1 deletions
|
@ -1,14 +1,17 @@
|
||||||
#include "Hellschreiber.h"
|
#include "Hellschreiber.h"
|
||||||
|
#if !defined(RADIOLIB_EXCLUDE_HELLSCHREIBER)
|
||||||
|
|
||||||
HellClient::HellClient(PhysicalLayer* phy) {
|
HellClient::HellClient(PhysicalLayer* phy) {
|
||||||
_phy = phy;
|
_phy = phy;
|
||||||
_audio = nullptr;
|
_audio = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
||||||
HellClient::HellClient(AFSKClient* audio) {
|
HellClient::HellClient(AFSKClient* audio) {
|
||||||
_phy = audio->_phy;
|
_phy = audio->_phy;
|
||||||
_audio = audio;
|
_audio = audio;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int16_t HellClient::begin(float base, float rate) {
|
int16_t HellClient::begin(float base, float rate) {
|
||||||
// calculate 24-bit frequency
|
// calculate 24-bit frequency
|
||||||
|
@ -295,3 +298,5 @@ int16_t HellClient::standby() {
|
||||||
return(_phy->standby());
|
return(_phy->standby());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef _RADIOLIB_HELLSCHREIBER_H
|
#if !defined(_RADIOLIB_HELLSCHREIBER_H) && !defined(RADIOLIB_EXCLUDE_HELLSCHREIBER)
|
||||||
#define _RADIOLIB_HELLSCHREIBER_H
|
#define _RADIOLIB_HELLSCHREIBER_H
|
||||||
|
|
||||||
#include "../../TypeDef.h"
|
#include "../../TypeDef.h"
|
||||||
|
@ -92,12 +92,14 @@ class HellClient {
|
||||||
*/
|
*/
|
||||||
HellClient(PhysicalLayer* phy);
|
HellClient(PhysicalLayer* phy);
|
||||||
|
|
||||||
|
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
||||||
/*!
|
/*!
|
||||||
\brief Constructor for AFSK mode.
|
\brief Constructor for AFSK mode.
|
||||||
|
|
||||||
\param audio Pointer to the AFSK instance providing audio.
|
\param audio Pointer to the AFSK instance providing audio.
|
||||||
*/
|
*/
|
||||||
HellClient(AFSKClient* audio);
|
HellClient(AFSKClient* audio);
|
||||||
|
#endif
|
||||||
|
|
||||||
// basic methods
|
// basic methods
|
||||||
|
|
||||||
|
@ -148,7 +150,11 @@ class HellClient {
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
PhysicalLayer* _phy;
|
PhysicalLayer* _phy;
|
||||||
|
#if !defined(RADIOLIB_EXCLUDE_AFSK)
|
||||||
AFSKClient* _audio;
|
AFSKClient* _audio;
|
||||||
|
#else
|
||||||
|
void* _audio;
|
||||||
|
#endif
|
||||||
|
|
||||||
uint32_t _base, _baseHz;
|
uint32_t _base, _baseHz;
|
||||||
uint32_t _pixelDuration;
|
uint32_t _pixelDuration;
|
||||||
|
|
Loading…
Add table
Reference in a new issue