bugfix lopy.h + lopy4.h

This commit is contained in:
Klaus K Wilting 2018-12-22 18:01:45 +01:00
parent d1303b81dc
commit 2f51a65b8f
3 changed files with 13 additions and 16 deletions

View File

@ -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

View File

@ -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)

View File

@ -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");