mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-08-07 14:02:13 -04:00
Factor out board config detection
This commit is contained in:
parent
498b1f12e9
commit
e67b38c005
6 changed files with 65 additions and 41 deletions
20
LoRa.cpp
20
LoRa.cpp
|
@ -6,24 +6,6 @@
|
|||
|
||||
#include "LoRa.h"
|
||||
|
||||
#define MCU_1284P 0x91
|
||||
#define MCU_2560 0x92
|
||||
#define MCU_ESP32 0x81
|
||||
#if defined(__AVR_ATmega1284P__)
|
||||
#define PLATFORM PLATFORM_AVR
|
||||
#define MCU_VARIANT MCU_1284P
|
||||
#elif defined(__AVR_ATmega2560__)
|
||||
#define PLATFORM PLATFORM_AVR
|
||||
#define MCU_VARIANT MCU_2560
|
||||
#elif defined(ESP32)
|
||||
#define PLATFORM PLATFORM_ESP32
|
||||
#define MCU_VARIANT MCU_ESP32
|
||||
#endif
|
||||
|
||||
#ifndef MCU_VARIANT
|
||||
#error No MCU variant defined, cannot compile
|
||||
#endif
|
||||
|
||||
#if MCU_VARIANT == MCU_ESP32
|
||||
#include "soc/rtc_wdt.h"
|
||||
#define ISR_VECT IRAM_ATTR
|
||||
|
@ -654,4 +636,4 @@ void ISR_VECT LoRaClass::onDio0Rise()
|
|||
LoRa.handleDio0Rise();
|
||||
}
|
||||
|
||||
LoRaClass LoRa;
|
||||
LoRaClass LoRa;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue