diff --git a/src/BuildOpt.h b/src/BuildOpt.h index 2112e21a..063a8e05 100644 --- a/src/BuildOpt.h +++ b/src/BuildOpt.h @@ -116,7 +116,7 @@ #else // other platforms not covered by the above list - this may or may not work - #warning "RadioLib might not be compatible with this Arduino board - check supported platforms at https://github.com/jgromes/RadioLib!" + #define RADIOLIB_UNKNOWN_PLATFORM #define RADIOLIB_PIN_TYPE uint8_t #define RADIOLIB_PIN_MODE uint8_t #define RADIOLIB_PIN_STATUS uint8_t diff --git a/src/RadioLib.h b/src/RadioLib.h index eea7044d..ae4a6909 100644 --- a/src/RadioLib.h +++ b/src/RadioLib.h @@ -41,10 +41,18 @@ #include "TypeDef.h" #include "Module.h" +// warnings are printed in this file since BuildOpt.h is compiled in multiple places + +// check God mode #ifdef RADIOLIB_GODMODE #warning "God mode active, I hope it was intentional. Buckle up, lads." #endif +// check unknown/unsupported platform +#ifdef RADIOLIB_UNKNOWN_PLATFORM + #warning "RadioLib might not be compatible with this Arduino board - check supported platforms at https://github.com/jgromes/RadioLib!" +#endif + #include "modules/CC1101/CC1101.h" #include "modules/ESP8266/ESP8266.h" #include "modules/HC05/HC05.h"