Skip to content

Commit

Permalink
Added warning for low-end platforms (Uno etc.)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Nov 18, 2023
1 parent bd1fbb3 commit 615cebc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/BuildOpt.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
// Arduino AVR boards (except for megaAVR) - Uno, Mega etc.
#define RADIOLIB_PLATFORM "Arduino AVR"

#if !(defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__))
#define RADIOLIB_LOWEND_PLATFORM
#endif

#elif defined(ESP8266)
// ESP8266 boards
#define RADIOLIB_PLATFORM "ESP8266"
Expand Down
5 changes: 5 additions & 0 deletions src/RadioLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
#warning "RadioLib might not be compatible with this Arduino board - check supported platforms at https://github.com/jgromes/RadioLib!"
#endif

// print warning for low-end platforms
#if defined(RADIOLIB_LOWEND_PLATFORM)
#warning "Low-end platform detected, stability issues are likely!"
#endif

#include "modules/CC1101/CC1101.h"
#include "modules/LLCC68/LLCC68.h"
#include "modules/nRF24/nRF24.h"
Expand Down

0 comments on commit 615cebc

Please sign in to comment.