Move RadioShield and CubeCell pin definition to RadioBoards

This commit is contained in:
jgromes 2024-10-20 16:20:49 +01:00
parent 2aa8c6e82a
commit a525d457ef
3 changed files with 0 additions and 55 deletions

View file

@ -7,7 +7,6 @@
#######################################
RadioLib KEYWORD1
RadioShield KEYWORD1
Module KEYWORD1
RadioLibHal KEYWORD1
ArduinoHal KEYWORD1

View file

@ -81,13 +81,6 @@
#define RADIOLIB_LOW_LEVEL (0)
#endif
/*
* Enable pre-defined modules when using RadioShield, disabled by default.
*/
#if !defined(RADIOLIB_RADIOSHIELD)
#define RADIOLIB_RADIOSHIELD (0)
#endif
/*
* Enable interrupt-based timing control
* For details, see https://github.com/jgromes/RadioLib/wiki/Interrupt-Based-Timing
@ -142,7 +135,6 @@
* RADIOLIB_NONVOLATILE_READ_BYTE - function/macro to read variables saved in program storage (usually Flash).
* RADIOLIB_TYPE_ALIAS - construct to create an alias for a type, usually vai the `using` keyword.
* RADIOLIB_TONE_UNSUPPORTED - some platforms do not have tone()/noTone(), which is required for AFSK.
* RADIOLIB_BUILTIN_MODULE - some platforms have a builtin radio module on fixed pins, this macro is used to specify that pinout.
*
* In addition, some platforms may require RadioLib to disable specific drivers (such as ESP8266).
*
@ -320,10 +312,6 @@
#define RADIOLIB_ARDUINOHAL_PIN_MODE_CAST (PINMODE)
#define RADIOLIB_ARDUINOHAL_INTERRUPT_MODE_CAST (IrqModes)
// provide an easy access to the on-board module
#include "board-config.h"
#define RADIOLIB_BUILTIN_MODULE RADIO_NSS, RADIO_DIO_1, RADIO_RESET, RADIO_BUSY
// CubeCell doesn't seem to define nullptr, let's do something like that now
#define nullptr NULL

View file

@ -114,46 +114,4 @@
#include "utils/CRC.h"
#include "utils/Cryptography.h"
// only create Radio class when using RadioShield
#if RADIOLIB_RADIOSHIELD
// RadioShield pin definitions
#define RADIOSHIELD_CS_A 10
#define RADIOSHIELD_IRQ_A 2
#define RADIOSHIELD_RST_A 9
#define RADIOSHIELD_GPIO_A 8
#define RADIOSHIELD_CS_B 5
#define RADIOSHIELD_IRQ_B 3
#define RADIOSHIELD_RST_B 7
#define RADIOSHIELD_GPIO_B 6
/*!
\class Radio
\brief Library control object when using RadioShield.
Contains two pre-configured "modules", which correspond to the slots on shield.
*/
class Radio {
public:
Module* ModuleA;
Module* ModuleB;
/*!
\brief Default constructor. Only used to set ModuleA and ModuleB configuration.
*/
Radio() {
ModuleA = new Module(RADIOSHIELD_CS_A, RADIOSHIELD_IRQ_A, RADIOSHIELD_RST_A, RADIOSHIELD_GPIO_A);
ModuleB = new Module(RADIOSHIELD_CS_B, RADIOSHIELD_IRQ_B, RADIOSHIELD_RST_B, RADIOSHIELD_GPIO_B);
}
#if RADIOLIB_GODMODE
private:
#endif
};
Radio RadioShield;
#endif
#endif