Revert "Disable software SPI for ESP32 MCUs"

This reverts commit 793b53dd4c.
This commit is contained in:
jacob.eva 2024-01-20 13:23:39 +00:00
parent f4c2fa592d
commit a304b892b7
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E
3 changed files with 6 additions and 17 deletions

View File

@ -316,7 +316,6 @@
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.
@ -334,17 +333,12 @@
#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

View File

@ -86,11 +86,7 @@ void setup() {
// 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);
}
#if MCU_VARIANT == MCU_ESP32 || MCU_VARIANT == MCU_NRF52
init_channel_stats();
@ -1305,10 +1301,10 @@ void buffer_serial() {
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)) {

View File

@ -13,8 +13,6 @@
// 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
@ -22,6 +20,7 @@
int written_bytes = 0;
#endif
#include <stddef.h>
#include "Config.h"
#include "LoRa.h"
#include "ROM.h"
#include "Framing.h"