mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2024-07-02 14:34:13 +02:00
Disable software SPI for ESP32 MCUs
This commit is contained in:
parent
d1e86b43b7
commit
793b53dd4c
8
Config.h
8
Config.h
@ -99,6 +99,8 @@
|
||||
#define HAS_PMU false
|
||||
#define HAS_NP false
|
||||
#define HAS_EEPROM false
|
||||
const int pin_rxen = -1;
|
||||
const int pin_busy = -1;
|
||||
|
||||
#if MCU_VARIANT == MCU_1284P
|
||||
const int pin_cs = 4;
|
||||
@ -306,13 +308,13 @@
|
||||
#define EEPROM_OFFSET EEPROM_SIZE+0xED000-EEPROM_RESERVED
|
||||
|
||||
// following pins are for the sx1262
|
||||
const int pin_rxen = 37;
|
||||
pin_rxen = 37;
|
||||
const int pin_reset = 38;
|
||||
const int pin_cs = 42;
|
||||
const int pin_sclk = 43;
|
||||
const int pin_mosi = 44;
|
||||
const int pin_miso = 45;
|
||||
const int pin_busy = 46;
|
||||
pin_busy = 46;
|
||||
const int pin_dio = 47;
|
||||
const int pin_led_rx = LED_BLUE;
|
||||
const int pin_led_tx = LED_GREEN;
|
||||
@ -333,7 +335,7 @@
|
||||
#define eeprom_addr(a) (a+EEPROM_OFFSET)
|
||||
|
||||
#if MODEM == SX1276 || MODEM == SX1278
|
||||
SPIClass spiModem(pin_miso, pin_sclk, pin_mosi);
|
||||
SPIClass spiModem();
|
||||
#elif MODEM == SX1262
|
||||
SPIClass spiModem(NRF_SPIM2, pin_miso, pin_sclk, pin_mosi);
|
||||
#endif
|
||||
|
@ -86,7 +86,11 @@ void setup() {
|
||||
|
||||
// Set chip select, reset and interrupt
|
||||
// pins for the LoRa module
|
||||
LoRa.setPins(pin_cs, pin_reset, pin_dio, pin_rxen, pin_busy);
|
||||
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);
|
||||
}
|
||||
|
||||
#if MCU_VARIANT == MCU_ESP32 || MCU_VARIANT == MCU_NRF52
|
||||
init_channel_stats();
|
||||
|
Loading…
Reference in New Issue
Block a user