Moved unsupported platform warning to RadioLib.h to only show it once

This commit is contained in:
jgromes 2020-04-01 10:49:45 +02:00
parent b731b60852
commit 9c0cd464d1
2 changed files with 9 additions and 1 deletions

View file

@ -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

View file

@ -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"