#include <Arduino.h>
#include <RadioLib.h>
#include <SPI.h>
#include "config.h"
#include "tools.h"
Go to the source code of this file.
|
#define | RADIO_PLUGIN_START |
|
#define | RADIO_PLUGIN_END |
|
#define | CHECK_RADIO_SET |
|
#define | PIN_MODE(x, y) if (x != -1) pinMode(x, y); |
|
#define | PIN_WRITE(x, y) if (x != -1) digitalWrite(x, y); |
|
#define | PIN_INPUT(x) if (x != -1) pinMode(x, INPUT) |
|
#define | PIN_OUTPUT(x) if (x != -1) pinMode(x, OUTPUT) |
|
#define | PIN_HIGH(x) if (x != -1) { pinMode(x, OUTPUT); digitalWrite(x, HIGH); } |
|
#define | PIN_LOW(x) if (x != -1) { pinMode(x, OUTPUT); digitalWrite(x, LOW); } |
|
#define | RADIO_DO(action) |
|
#define | MODULE_DO(action) |
|
◆ RADIO_PLUGIN_START
#define RADIO_PLUGIN_START |
Value: namespace ook {\
namespace
CONCAT(radio_, PLUGIN_NAME) {\
class RadioPlugin :
public Radio {\
public:
Definition at line 10 of file Radio.h.
◆ RADIO_PLUGIN_END
Value: };\
struct AutoRegister {\
AutoRegister() {\
static RadioPlugin radioPlugin;
\
}\
} autoRegister;\
}\
}
static bool add(const char *name, Radio *pointer)
Registers an instance of Radio, i.e. a radio plugin in the static store
Definition at line 16 of file Radio.h.
◆ CHECK_RADIO_SET
Value: if (current == nullptr) {\
ERROR("ERROR: No radio selected.\n");\
return false;\
}
Definition at line 27 of file Radio.h.
◆ PIN_MODE
#define PIN_MODE |
( |
|
x, |
|
|
|
y |
|
) |
| if (x != -1) pinMode(x, y); |
◆ PIN_WRITE
#define PIN_WRITE |
( |
|
x, |
|
|
|
y |
|
) |
| if (x != -1) digitalWrite(x, y); |
◆ PIN_INPUT
#define PIN_INPUT |
( |
|
x | ) |
if (x != -1) pinMode(x, INPUT) |
◆ PIN_OUTPUT
#define PIN_OUTPUT |
( |
|
x | ) |
if (x != -1) pinMode(x, OUTPUT) |
◆ PIN_HIGH
#define PIN_HIGH |
( |
|
x | ) |
if (x != -1) { pinMode(x, OUTPUT); digitalWrite(x, HIGH); } |
◆ PIN_LOW
#define PIN_LOW |
( |
|
x | ) |
if (x != -1) { pinMode(x, OUTPUT); digitalWrite(x, LOW); } |
◆ RADIO_DO
#define RADIO_DO |
( |
|
action | ) |
|
Value: {\
int res = radio->action;\
showRadiolibResult(res, #action);\
if (res != 0) return false;\
}
Definition at line 41 of file Radio.h.
◆ MODULE_DO
#define MODULE_DO |
( |
|
action | ) |
|
Value: {\
int res = radioLibModule->action;\
showRadiolibResult(res, #action);\
if (res != 0) return false;\
}
Definition at line 47 of file Radio.h.