diff --git a/src/hal/lopy.h b/src/hal/lopy.h index 5fe522b2..83ba8290 100644 --- a/src/hal/lopy.h +++ b/src/hal/lopy.h @@ -14,8 +14,7 @@ // Pins for LORA chip SPI interface come from board file, we need some // additional definitions for LMIC -#define LORA_IO1 (23) // Pin tied via diode to DIO0 -#define LORA_IO2 (23) // Pin tied via diode to DIO0 +#define LORA_IRQ (23) // select WIFI antenna (internal = onboard / external = u.fl socket) #define HAS_ANTENNA_SWITCH (16) // pin for switching wifi antenna diff --git a/src/hal/lopy4.h b/src/hal/lopy4.h index 248fc3bc..e7ef88ba 100644 --- a/src/hal/lopy4.h +++ b/src/hal/lopy4.h @@ -9,12 +9,12 @@ #define HAS_LORA 1 // comment out if device shall not send data via LoRa -#define HAS_SPI 1 // comment out if device shall not send data via SPI +//#defin HAS_SPI 1 // comment out if device shall not send data via SPI // pin definitions for local wired SPI slave interface -#define SPI_MOSI GPIO_NUM_22 -#define SPI_MISO GPIO_NUM_33 -#define SPI_SCLK GPIO_NUM_26 -#define SPI_CS GPIO_NUM_36 +//#define SPI_MOSI GPIO_NUM_22 +//#define SPI_MISO GPIO_NUM_33 +//#define SPI_SCLK GPIO_NUM_26 +//#define SPI_CS GPIO_NUM_36 #define CFG_sx1276_radio 1 //#define HAS_LED NOT_A_PIN // LoPy4 has no on board mono LED, we use on board RGB LED @@ -23,8 +23,9 @@ // Pins for LORA chip SPI interface come from board file, we need some // additional definitions for LMIC -#define LORA_IO1 (23) // Pin tied via diode to DIO0 -#define LORA_IO2 (23) // Pin tied via diode to DIO0 +#define LORA_IRQ (23) +#define LORA_RST NOT_A_PIN +#define SS 18 // select WIFI antenna (internal = onboard / external = u.fl socket) #define HAS_ANTENNA_SWITCH (21) // pin for switching wifi antenna (P12) diff --git a/src/main.cpp b/src/main.cpp index 2ba2268e..5a0604cc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -128,15 +128,12 @@ void setup() { loadConfig(); // includes initialize if necessary #ifdef BOARD_HAS_PSRAM - if (psramFound()) { - ESP_LOGI(TAG, "PSRAM found and initialized"); - strcat_P(features, " PSRAM"); - } else - ESP_LOGI(TAG, "No PSRAM found"); -#else + assert(psramFound()); + ESP_LOGI(TAG, "PSRAM found and initialized"); + strcat_P(features, " PSRAM"); #endif - // initialize leds + // initialize leds #if (HAS_LED != NOT_A_PIN) pinMode(HAS_LED, OUTPUT); strcat_P(features, " LED");