From d34367201507342f37bb5a1e4ce541a08d3e6638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Grome=C5=A1?= Date: Mon, 29 Jun 2020 09:58:38 +0200 Subject: [PATCH] Updated Custom Build Configuration (markdown) --- Custom-Build-Configuration.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Custom-Build-Configuration.md b/Custom-Build-Configuration.md index 41c642e..62be4ff 100644 --- a/Custom-Build-Configuration.md +++ b/Custom-Build-Configuration.md @@ -1,9 +1,12 @@ # Custom Build Configuration -RadioLib supports many different Arduino cores, but sometimes it may be beneficial to define your own "platform". This can be achieved by frist defining the macro `RADIOLIB_CUSTOM_PLATFORM` and then defining all the required platform specification parameters. All the definitions **MUST** be placed in the Arduino sketch prior to including the main library file RadioLib.h, as is shown in the following example. +RadioLib supports many different Arduino cores, but sometimes it may be beneficial to define your own "platform". This can be achieved by in the [BuildOpt file](https://github.com/jgromes/RadioLib/blob/4ad5261a8333eabb7af332fc60df5e007bf22647/src/BuildOpt.h#L32-L52). First, the macro `RADIOLIB_CUSTOM_PLATFORM`must be defined. + +Then, custom configuration can be changed in the section below that macro. Custom platform definition will override automatic platform detection. ```c++ -#define RADIOLIB_CUSTOM_PLATFORM +// name for your platform +#define RADIOLIB_PLATFORM "Custom" // the following parameters must always be defined #define RADIOLIB_PIN_TYPE uint8_t @@ -15,11 +18,9 @@ RadioLib supports many different Arduino cores, but sometimes it may be benefici #define RADIOLIB_DEFAULT_SPI SPI // the following must be defined if the Arduino core does not support SoftwareSerial library -#define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED -#define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 +//#define RADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED +//#define RADIOLIB_HARDWARE_SERIAL_PORT Serial1 // the following must be defined if the Arduino core does not support tone function -#define RADIOLIB_TONE_UNSUPPORTED - -#include +//#define RADIOLIB_TONE_UNSUPPORTED ``` \ No newline at end of file