const int pin_dio = 47;
const int pin_led_rx = LED_BLUE;
const int pin_led_tx = LED_GREEN;
- #define RXEN_BUSY_PINS
#endif
#else
#error An unsupported board was selected. Cannot compile RNode firmware.
#define eeprom_addr(a) (a+EEPROM_OFFSET)
#if MODEM == SX1276 || MODEM == SX1278
- SPIClass spiModem();
+ SPIClass spiModem(pin_miso, pin_sclk, pin_mosi);
#elif MODEM == SX1262
SPIClass spiModem(NRF_SPIM2, pin_miso, pin_sclk, pin_mosi);
#endif
// MCU independent configuration parameters
- #ifndef RXEN_BUSY_PINS
- const int pin_rxen = -1;
- const int pin_busy = -1;
- #endif
-
const long serial_baudrate = 115200;
// SX1276 RSSI offset to get dBm value from
// Set chip select, reset and interrupt
// pins for the LoRa module
- if ((pin_rxen != -1) && (pin_busy != -1)) {
- LoRa.setPins(pin_cs, pin_reset, pin_dio, pin_rxen, pin_busy);
- } else {
- LoRa.setPins(pin_cs, pin_reset, pin_dio);
- }
+ LoRa.setPins(pin_cs, pin_reset, pin_dio, pin_rxen, pin_busy);
#if MCU_VARIANT == MCU_ESP32 || MCU_VARIANT == MCU_NRF52
init_channel_stats();
if (!fifo_isfull_locked(&serialFIFO)) {
fifo_push_locked(&serialFIFO, Serial.read());
}
- #elif HAS_BLUETOOTH
- if (bt_state == BT_STATE_CONNECTED) {
+ #else
+ if (HAS_BLUETOOTH && bt_state == BT_STATE_CONNECTED) {
if (!fifo_isfull(&serialFIFO)) {
- fifo_push(&serialFIFO, SerialBT.read());
+ //fifo_push(&serialFIFO, SerialBT.read());
}
} else {
if (!fifo_isfull(&serialFIFO)) {
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-#include "Config.h"
-
#if HAS_EEPROM
#include <EEPROM.h>
#elif PLATFORM == PLATFORM_NRF52
int written_bytes = 0;
#endif
#include <stddef.h>
+#include "Config.h"
#include "LoRa.h"
#include "ROM.h"
#include "Framing.h"