diff --git a/src/ISerial.h b/src/ISerial.h index cc45cec5..d086beaf 100644 --- a/src/ISerial.h +++ b/src/ISerial.h @@ -54,7 +54,9 @@ class ISerial { size_t println(const Printable&); size_t println(void); +#ifndef RADIOLIB_GODMODE protected: +#endif Module* _mod; }; diff --git a/src/Module.h b/src/Module.h index 1b4861b6..d4b55321 100644 --- a/src/Module.h +++ b/src/Module.h @@ -310,7 +310,9 @@ class Module { */ SPISettings getSpiSettings() const { return(_spiSettings); } +#ifndef RADIOLIB_GODMODE private: +#endif int _cs; int _tx; int _rx; diff --git a/src/RadioLib.h b/src/RadioLib.h index b9951e52..cb492167 100644 --- a/src/RadioLib.h +++ b/src/RadioLib.h @@ -38,6 +38,10 @@ #include "TypeDef.h" #include "Module.h" +#ifdef RADIOLIB_GODMODE + #warning "God mode active, I hope it was intentional. Buckle up, lads." +#endif + #include "modules/CC1101.h" #ifndef ESP8266 #include "modules/ESP8266.h" @@ -101,7 +105,9 @@ class Radio { Module* ModuleA; Module* ModuleB; +#ifndef RADIOLIB_GODMODE private: +#endif }; diff --git a/src/TypeDef.h b/src/TypeDef.h index 25593d80..1c782564 100644 --- a/src/TypeDef.h +++ b/src/TypeDef.h @@ -18,7 +18,8 @@ /* * Uncomment to enable debug output. - * Warning: Debug output will slow down the whole system significantly + * Warning: Debug output will slow down the whole system significantly. + * Also, it will result in larger compiled binary. * Levels: debug - only main info * verbose - full transcript of all SPI/UART communication */ diff --git a/src/modules/CC1101.h b/src/modules/CC1101.h index 30e64353..b4583389 100644 --- a/src/modules/CC1101.h +++ b/src/modules/CC1101.h @@ -820,7 +820,9 @@ class CC1101: public PhysicalLayer { */ int16_t setPromiscuousMode(bool promiscuous = true); +#ifndef RADIOLIB_GODMODE private: +#endif Module* _mod; float _freq; diff --git a/src/modules/ESP8266.h b/src/modules/ESP8266.h index 8d5d0a9e..f8baa27e 100644 --- a/src/modules/ESP8266.h +++ b/src/modules/ESP8266.h @@ -54,7 +54,9 @@ class ESP8266: public TransportLayer { size_t receive(uint8_t* data, size_t len, uint32_t timeout = 10000); size_t getNumBytes(uint32_t timeout = 10000, size_t minBytes = 10); +#ifndef RADIOLIB_GODMODE private: +#endif Module* _mod; }; diff --git a/src/modules/RF69.h b/src/modules/RF69.h index 5318b7e8..a7847d61 100644 --- a/src/modules/RF69.h +++ b/src/modules/RF69.h @@ -762,7 +762,9 @@ class RF69: public PhysicalLayer { */ int16_t setPromiscuousMode(bool promiscuous = true); +#ifndef RADIOLIB_GODMODE protected: +#endif Module* _mod; float _br; @@ -780,7 +782,9 @@ class RF69: public PhysicalLayer { int16_t config(); int16_t directMode(); +#ifndef RADIOLIB_GODMODE private: +#endif int16_t setMode(uint8_t mode); void clearIRQFlags(); }; diff --git a/src/modules/RFM95.h b/src/modules/RFM95.h index 3865ef83..6409f968 100644 --- a/src/modules/RFM95.h +++ b/src/modules/RFM95.h @@ -16,59 +16,61 @@ */ class RFM95: public SX1278 { public: - + // constructor - + /*! \brief Default constructor. Called from Arduino sketch when creating new LoRa instance. - + \param mod Instance of Module that will be used to communicate with the %LoRa chip. */ RFM95(Module* mod); - + // basic methods - + /*! \brief %LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. - + \param freq Carrier frequency in MHz. Allowed values range from 868.0 MHz to 915.0 MHz. - + \param bw %LoRa link bandwidth in kHz. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250 and 500 kHz. - + \param sf %LoRa link spreading factor. Allowed values range from 6 to 12. - + \param cr %LoRa link coding rate denominator. Allowed values range from 5 to 8. - + \param syncWord %LoRa sync word. Can be used to distinguish different networks. Note that value 0x34 is reserved for LoRaWAN networks. - + \param power Transmission output power in dBm. Allowed values range from 2 to 17 dBm. - - \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. + + \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. Set to 0 to disable OCP (not recommended). - - \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. + + \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. Allowed values range from 6 to 65535. - + \param gain Gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). - + \returns \ref status_codes */ int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 17, uint8_t currentLimit = 100, uint16_t preambleLength = 8, uint8_t gain = 0); - + // configuration methods - + /*! \brief Sets carrier frequency. Allowed values range from 868.0 MHz to 915.0 MHz. - + \param freq Carrier frequency to be set in MHz. - + \returns \ref status_codes */ int16_t setFrequency(float freq); +#ifndef RADIOLIB_GODMODE private: - +#endif + }; #endif diff --git a/src/modules/RFM96.h b/src/modules/RFM96.h index 2190e80d..9683ff2b 100644 --- a/src/modules/RFM96.h +++ b/src/modules/RFM96.h @@ -16,59 +16,61 @@ */ class RFM96: public SX1278 { public: - + // constructor - + /*! \brief Default constructor. Called from Arduino sketch when creating new LoRa instance. - + \param mod Instance of Module that will be used to communicate with the %LoRa chip. */ RFM96(Module* mod); - + // basic methods - + /*! \brief %LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. - + \param freq Carrier frequency in MHz. Allowed values range from 433.0 MHz to 470.0 MHz. - + \param bw %LoRa link bandwidth in kHz. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250 and 500 kHz. - + \param sf %LoRa link spreading factor. Allowed values range from 6 to 12. - + \param cr %LoRa link coding rate denominator. Allowed values range from 5 to 8. - + \param syncWord %LoRa sync word. Can be used to distinguish different networks. Note that value 0x34 is reserved for LoRaWAN networks. - + \param power Transmission output power in dBm. Allowed values range from 2 to 17 dBm. - - \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. + + \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. Set to 0 to disable OCP (not recommended). - - \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. + + \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. Allowed values range from 6 to 65535. - + \param gain Gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). - + \returns \ref status_codes */ int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 17, uint8_t currentLimit = 100, uint16_t preambleLength = 8, uint8_t gain = 0); - + // configuration methods - + /*! \brief Sets carrier frequency. Allowed values range from 433.0 MHz to 470.0 MHz. - + \param freq Carrier frequency to be set in MHz. - + \returns \ref status_codes */ int16_t setFrequency(float freq); - + +#ifndef RADIOLIB_GODMODE private: - +#endif + }; /*! diff --git a/src/modules/RFM97.h b/src/modules/RFM97.h index a85e7ab7..7834efbf 100644 --- a/src/modules/RFM97.h +++ b/src/modules/RFM97.h @@ -14,28 +14,31 @@ */ class RFM97: public RFM95 { public: - + // constructor - + /*! \brief Default constructor. Called from Arduino sketch when creating new LoRa instance. - + \param mod Instance of Module that will be used to communicate with the %LoRa chip. */ RFM97(Module* mod); - + // configuration methods - + /*! \brief Sets %LoRa link spreading factor. Allowed values range from 6 to 9. Only available in %LoRa mode. - + \param sf %LoRa link spreading factor to be set. - + \returns \ref status_codes */ int16_t setSpreadingFactor(uint8_t sf); - + +#ifndef RADIOLIB_GODMODE private: +#endif + }; #endif diff --git a/src/modules/SX1231.h b/src/modules/SX1231.h index 00d6b802..06d16d86 100644 --- a/src/modules/SX1231.h +++ b/src/modules/SX1231.h @@ -46,7 +46,9 @@ class SX1231: public RF69 { */ int16_t begin(float freq = 434.0, float br = 48.0, float rxBw = 125.0, float freqDev = 50.0, int8_t power = 13); +#ifndef RADIOLIB_GODMODE private: +#endif uint8_t _chipRevision; }; diff --git a/src/modules/SX1261.h b/src/modules/SX1261.h index 22c7cadd..33be28cd 100644 --- a/src/modules/SX1261.h +++ b/src/modules/SX1261.h @@ -32,7 +32,9 @@ class SX1261 : public SX1262 { */ int16_t setOutputPower(int8_t power); +#ifndef RADIOLIB_GODMODE private: +#endif int16_t setOptimalLowPowerPaConfig(int8_t* inOutPower); }; diff --git a/src/modules/SX1262.h b/src/modules/SX1262.h index 38180464..e0a207a5 100644 --- a/src/modules/SX1262.h +++ b/src/modules/SX1262.h @@ -89,7 +89,10 @@ class SX1262: public SX126x { */ int16_t setOutputPower(int8_t power); +#ifndef RADIOLIB_GODMODE private: +#endif + }; #endif diff --git a/src/modules/SX1268.h b/src/modules/SX1268.h index 9c05529d..af6f492b 100644 --- a/src/modules/SX1268.h +++ b/src/modules/SX1268.h @@ -91,6 +91,11 @@ class SX1268: public SX126x { \returns \ref status_codes */ int16_t setOutputPower(int8_t power); + +#ifndef RADIOLIB_GODMODE + private: +#endif + }; #endif diff --git a/src/modules/SX126x.h b/src/modules/SX126x.h index d82721c5..c33bb9e7 100644 --- a/src/modules/SX126x.h +++ b/src/modules/SX126x.h @@ -724,7 +724,9 @@ class SX126x: public PhysicalLayer { */ uint32_t getTimeOnAir(size_t len); +#ifndef RADIOLIB_GODMODE protected: +#endif // SX1276x SPI command implementations int16_t setTx(uint32_t timeout = 0); int16_t setRx(uint32_t timeout); @@ -758,7 +760,10 @@ class SX126x: public PhysicalLayer { \brief Fixes overly eager PA clamping on SX1262 / SX1268, as described in section 15.2 of the datasheet */ int16_t fixPaClamping(); + +#ifndef RADIOLIB_GODMODE private: +#endif Module* _mod; uint8_t _bw, _sf, _cr, _ldro, _crcType; @@ -774,8 +779,6 @@ class SX126x: public PhysicalLayer { int16_t config(uint8_t modem); - - // common low-level SPI interface int16_t SPIwriteCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true); int16_t SPIwriteCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true); diff --git a/src/modules/SX1272.h b/src/modules/SX1272.h index 26f8ac9f..2c707b63 100644 --- a/src/modules/SX1272.h +++ b/src/modules/SX1272.h @@ -250,15 +250,19 @@ class SX1272: public SX127x { */ int16_t setCRC(bool enableCRC); +#ifndef RADIOLIB_GODMODE protected: +#endif int16_t setBandwidthRaw(uint8_t newBandwidth); int16_t setSpreadingFactorRaw(uint8_t newSpreadingFactor); int16_t setCodingRateRaw(uint8_t newCodingRate); int16_t configFSK(); +#ifndef RADIOLIB_GODMODE private: - +#endif + }; #endif diff --git a/src/modules/SX1273.h b/src/modules/SX1273.h index 03c55b6e..4a78229d 100644 --- a/src/modules/SX1273.h +++ b/src/modules/SX1273.h @@ -11,56 +11,61 @@ */ class SX1273: public SX1272 { public: - + // constructor - + /*! \brief Default constructor. Called from Arduino sketch when creating new LoRa instance. - + \param mod Instance of Module that will be used to communicate with the %LoRa chip. */ SX1273(Module* mod); - + // basic methods - + /*! \brief %LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. - + \param freq Carrier frequency in MHz. Allowed values range from 860.0 MHz to 1020.0 MHz. - + \param bw %LoRa link bandwidth in kHz. Allowed values are 125, 250 and 500 kHz. - + \param sf %LoRa link spreading factor. Allowed values range from 6 to 9. - + \param cr %LoRa link coding rate denominator. Allowed values range from 5 to 8. - + \param syncWord %LoRa sync word. Can be used to distinguish different networks. Note that value 0x34 is reserved for LoRaWAN networks. - + \param power Transmission output power in dBm. Allowed values range from 2 to 17 dBm. - - \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. + + \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. Set to 0 to disable OCP (not recommended). - - \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. + + \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. Allowed values range from 6 to 65535. - + \param gain Gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). - + \returns \ref status_codes */ int16_t begin(float freq = 915.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 17, uint8_t currentLimit = 100, uint16_t preambleLength = 8, uint8_t gain = 0); - + // configuration methods - + /*! \brief Sets %LoRa link spreading factor. Allowed values range from 6 to 9. Only available in %LoRa mode. - + \param sf %LoRa link spreading factor to be set. - + \returns \ref status_codes */ int16_t setSpreadingFactor(uint8_t sf); + +#ifndef RADIOLIB_GODMODE + private: +#endif + }; #endif diff --git a/src/modules/SX1276.h b/src/modules/SX1276.h index fe1fc23d..fbf7faae 100644 --- a/src/modules/SX1276.h +++ b/src/modules/SX1276.h @@ -11,56 +11,61 @@ */ class SX1276: public SX1278 { public: - + // constructor - + /*! \brief Default constructor. Called from Arduino sketch when creating new LoRa instance. - + \param mod Instance of Module that will be used to communicate with the %LoRa chip. */ SX1276(Module* mod); - + // basic methods - + /*! \brief %LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. - + \param freq Carrier frequency in MHz. Allowed values range from 137.0 MHz to 1020.0 MHz. - + \param bw %LoRa link bandwidth in kHz. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250 and 500 kHz. - + \param sf %LoRa link spreading factor. Allowed values range from 6 to 12. - + \param cr %LoRa link coding rate denominator. Allowed values range from 5 to 8. - + \param syncWord %LoRa sync word. Can be used to distinguish different networks. Note that value 0x34 is reserved for LoRaWAN networks. - + \param power Transmission output power in dBm. Allowed values range from 2 to 17 dBm. - - \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. + + \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. Set to 0 to disable OCP (not recommended). - - \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. + + \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. Allowed values range from 6 to 65535. - + \param gain Gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). - + \returns \ref status_codes */ int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 17, uint8_t currentLimit = 100, uint16_t preambleLength = 8, uint8_t gain = 0); - + // configuration methods - + /*! \brief Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz. - + \param freq Carrier frequency to be set in MHz. - + \returns \ref status_codes */ int16_t setFrequency(float freq); + +#ifndef RADIOLIB_GODMODE + private: +#endif + }; #endif diff --git a/src/modules/SX1277.h b/src/modules/SX1277.h index 73f65610..53727990 100644 --- a/src/modules/SX1277.h +++ b/src/modules/SX1277.h @@ -11,65 +11,70 @@ */ class SX1277: public SX1278 { public: - + // constructor - + /*! \brief Default constructor. Called from Arduino sketch when creating new LoRa instance. - + \param mod Instance of Module that will be used to communicate with the %LoRa chip. */ SX1277(Module* mod); - + // basic methods - + /*! \brief %LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. - + \param freq Carrier frequency in MHz. Allowed values range from 137.0 MHz to 1020.0 MHz. - + \param bw %LoRa link bandwidth in kHz. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250 and 500 kHz. - + \param sf %LoRa link spreading factor. Allowed values range from 6 to 9. - + \param cr %LoRa link coding rate denominator. Allowed values range from 5 to 8. - + \param syncWord %LoRa sync word. Can be used to distinguish different networks. Note that value 0x34 is reserved for LoRaWAN networks. - + \param power Transmission output power in dBm. Allowed values range from 2 to 17 dBm. - - \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. + + \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. Set to 0 to disable OCP (not recommended). - - \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. + + \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. Allowed values range from 6 to 65535. - + \param gain Gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). - + \returns \ref status_codes */ int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 17, uint8_t currentLimit = 100, uint16_t preambleLength = 8, uint8_t gain = 0); - + // configuration methods - + /*! \brief Sets carrier frequency. Allowed values range from 137.0 MHz to 1020.0 MHz. - + \param freq Carrier frequency to be set in MHz. - + \returns \ref status_codes */ int16_t setFrequency(float freq); - + /*! \brief Sets %LoRa link spreading factor. Allowed values range from 6 to 9. Only available in %LoRa mode. - + \param sf %LoRa link spreading factor to be set. - + \returns \ref status_codes */ int16_t setSpreadingFactor(uint8_t sf); + +#ifndef RADIOLIB_GODMODE + private: +#endif + }; #endif diff --git a/src/modules/SX1278.h b/src/modules/SX1278.h index 1715e4b1..92322b25 100644 --- a/src/modules/SX1278.h +++ b/src/modules/SX1278.h @@ -259,15 +259,19 @@ class SX1278: public SX127x { */ int16_t setCRC(bool enableCRC); +#ifndef RADIOLIB_GODMODE protected: +#endif int16_t setBandwidthRaw(uint8_t newBandwidth); int16_t setSpreadingFactorRaw(uint8_t newSpreadingFactor); int16_t setCodingRateRaw(uint8_t newCodingRate); int16_t configFSK(); +#ifndef RADIOLIB_GODMODE private: - +#endif + }; #endif diff --git a/src/modules/SX1279.h b/src/modules/SX1279.h index 26607bfd..d625ec0c 100644 --- a/src/modules/SX1279.h +++ b/src/modules/SX1279.h @@ -11,56 +11,61 @@ */ class SX1279: public SX1278 { public: - + // constructor - + /*! \brief Default constructor. Called from Arduino sketch when creating new LoRa instance. - + \param mod Instance of Module that will be used to communicate with the %LoRa chip. */ SX1279(Module* mod); - + // basic methods - + /*! \brief %LoRa modem initialization method. Must be called at least once from Arduino sketch to initialize the module. - + \param freq Carrier frequency in MHz. Allowed values range from 137.0 MHz to 960.0 MHz. - + \param bw %LoRa link bandwidth in kHz. Allowed values are 10.4, 15.6, 20.8, 31.25, 41.7, 62.5, 125, 250 and 500 kHz. - + \param sf %LoRa link spreading factor. Allowed values range from 6 to 12. - + \param cr %LoRa link coding rate denominator. Allowed values range from 5 to 8. - + \param syncWord %LoRa sync word. Can be used to distinguish different networks. Note that value 0x34 is reserved for LoRaWAN networks. - + \param power Transmission output power in dBm. Allowed values range from 2 to 17 dBm. - - \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. + + \param currentLimit Trim value for OCP (over current protection) in mA. Can be set to multiplies of 5 in range 45 to 120 mA and to multiples of 10 in range 120 to 240 mA. Set to 0 to disable OCP (not recommended). - - \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. + + \param preambleLength Length of %LoRa transmission preamble in symbols. The actual preamble length is 4.25 symbols longer than the set number. Allowed values range from 6 to 65535. - + \param gain Gain of receiver LNA (low-noise amplifier). Can be set to any integer in range 1 to 6 where 1 is the highest gain. Set to 0 to enable automatic gain control (recommended). - + \returns \ref status_codes */ int16_t begin(float freq = 434.0, float bw = 125.0, uint8_t sf = 9, uint8_t cr = 7, uint8_t syncWord = SX127X_SYNC_WORD, int8_t power = 17, uint8_t currentLimit = 100, uint16_t preambleLength = 8, uint8_t gain = 0); - + // configuration methods - + /*! \brief Sets carrier frequency. Allowed values range from 137.0 MHz to 960.0 MHz. - + \param freq Carrier frequency to be set in MHz. - + \returns \ref status_codes */ int16_t setFrequency(float freq); + +#ifndef RADIOLIB_GODMODE + private: +#endif + }; #endif diff --git a/src/modules/SX127x.h b/src/modules/SX127x.h index 05f1e5cf..a1df3ee7 100644 --- a/src/modules/SX127x.h +++ b/src/modules/SX127x.h @@ -867,7 +867,9 @@ class SX127x: public PhysicalLayer { void regDump(); #endif +#ifndef RADIOLIB_GODMODE protected: +#endif Module* _mod; float _freq; @@ -884,8 +886,9 @@ class SX127x: public PhysicalLayer { int16_t getActiveModem(); int16_t directMode(); - +#ifndef RADIOLIB_GODMODE private: +#endif float _dataRate; size_t _packetLength; bool _packetLengthQueried; // FSK packet length is the first byte in FIFO, length can only be queried once diff --git a/src/modules/XBee.h b/src/modules/XBee.h index ff6bc394..6eca70f0 100644 --- a/src/modules/XBee.h +++ b/src/modules/XBee.h @@ -81,7 +81,9 @@ class XBeeSerial: public ISerial { */ int16_t setPanId(const char* panID); +#ifndef RADIOLIB_GODMODE private: +#endif bool enterCmdMode(); }; @@ -170,7 +172,9 @@ class XBee { */ int16_t setPanId(uint8_t* panID); +#ifndef RADIOLIB_GODMODE private: +#endif Module* _mod; uint8_t _frameID; size_t _frameLength; diff --git a/src/modules/nRF24.h b/src/modules/nRF24.h index 6b577576..4ab07353 100644 --- a/src/modules/nRF24.h +++ b/src/modules/nRF24.h @@ -408,7 +408,9 @@ class nRF24: public PhysicalLayer { */ size_t getPacketLength(bool update = true); +#ifndef RADIOLIB_GODMODE private: +#endif Module* _mod; uint8_t _addrWidth; diff --git a/src/protocols/HTTP.h b/src/protocols/HTTP.h index b0309853..cc5575b5 100644 --- a/src/protocols/HTTP.h +++ b/src/protocols/HTTP.h @@ -58,7 +58,9 @@ class HTTPClient { */ int16_t post(const char* url, const char* content, String& response, const char* contentType = "text/plain"); +#ifndef RADIOLIB_GODMODE private: +#endif TransportLayer* _tl; uint16_t _port; diff --git a/src/protocols/MQTT.h b/src/protocols/MQTT.h index d2710047..0062c1cd 100644 --- a/src/protocols/MQTT.h +++ b/src/protocols/MQTT.h @@ -127,7 +127,9 @@ class MQTTClient { */ int16_t check(void (*func)(const char*, const char*)); +#ifndef RADIOLIB_GODMODE private: +#endif TransportLayer* _tl; uint16_t _port; diff --git a/src/protocols/Morse.h b/src/protocols/Morse.h index 7e04e854..28d73a90 100644 --- a/src/protocols/Morse.h +++ b/src/protocols/Morse.h @@ -67,7 +67,9 @@ class MorseClient { size_t println(unsigned long, int = DEC); size_t println(double, int = 2); +#ifndef RADIOLIB_GODMODE private: +#endif PhysicalLayer* _phy; uint32_t _base; uint16_t _dotLength; diff --git a/src/protocols/PhysicalLayer.h b/src/protocols/PhysicalLayer.h index 51c01b98..ec5b8728 100644 --- a/src/protocols/PhysicalLayer.h +++ b/src/protocols/PhysicalLayer.h @@ -87,7 +87,7 @@ class PhysicalLayer { /*! \brief Sets module to standby. - + \returns \ref status_codes */ virtual int16_t standby() = 0; @@ -215,7 +215,9 @@ class PhysicalLayer { */ virtual size_t getPacketLength(bool update = true) = 0; +#ifndef RADIOLIB_GODMODE private: +#endif float _crystalFreq; uint8_t _divExponent; size_t _maxPacketLength; diff --git a/src/protocols/RTTY.h b/src/protocols/RTTY.h index ae1d286c..646b45dd 100644 --- a/src/protocols/RTTY.h +++ b/src/protocols/RTTY.h @@ -57,7 +57,9 @@ class ITA2String { */ uint8_t* byteArr(); +#ifndef RADIOLIB_GODMODE private: +#endif #ifdef RADIOLIB_STATIC_ONLY char _str[RADIOLIB_STATIC_ARRAY_SIZE]; #else @@ -141,7 +143,9 @@ class RTTYClient { size_t println(unsigned long, int = DEC); size_t println(double, int = 2); +#ifndef RADIOLIB_GODMODE private: +#endif PhysicalLayer* _phy; uint8_t _encoding;