diff --git a/src/hal/heltec.h b/src/hal/heltec.h index 761d2b2c..1e6dd174 100644 --- a/src/hal/heltec.h +++ b/src/hal/heltec.h @@ -24,5 +24,12 @@ // additional definitions for LMIC #define LORA_IO1 (33) #define LORA_IO2 LMIC_UNUSED_PIN +#define LORA_SCK (5) +#define LORA_MOSI (27) +#define LORA_MISO (19) +#define LORA_CS (18) +#define LORA_RST (14) +#define LORA_IRQ (26) + #endif diff --git a/src/hal/heltecv2.h b/src/hal/heltecv2.h index a07147e2..40d1f266 100644 --- a/src/hal/heltecv2.h +++ b/src/hal/heltecv2.h @@ -26,5 +26,11 @@ // additional definitions for LMIC #define LORA_IO1 (35) #define LORA_IO2 (34) +#define LORA_SCK (5) +#define LORA_MOSI (27) +#define LORA_MISO (19) +#define LORA_CS (18) +#define LORA_RST (14) +#define LORA_IRQ (26) #endif diff --git a/src/hal/lopy.h b/src/hal/lopy.h index 5fe522b2..a7d92dad 100644 --- a/src/hal/lopy.h +++ b/src/hal/lopy.h @@ -14,8 +14,16 @@ // 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_SCK 5 // GPIO5 - SX1276 SCK +#define LORA_MISO 19 // GPIO19 - SX1276 MISO +#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI +#define LORA_CS 17 // GPIO17 - SX1276 CS +#define LORA_RST 18 // GPIO18 - SX1276 RST +#define LORA_IRQ 23 // GPIO23 - SX1276 IO0 +#define LORA_IO0 LORA_IRQ // alias +#define LORA_IO1 LORA_IRQ // tied by diode to IO0 +#define LORA_IO2 LORA_IRQ // tied by diode to IO0 + // 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..265ea171 100644 --- a/src/hal/lopy4.h +++ b/src/hal/lopy4.h @@ -23,8 +23,15 @@ // 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_SCK 5 // GPIO5 - SX1276 SCK +#define LORA_MISO 19 // GPIO19 - SX1276 MISO +#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI +#define LORA_CS 18 // GPIO18 - SX1276 CS +#define LORA_IRQ 23 // GPIO23 - SX1276 IO0 +#define LORA_IO0 LORA_IRQ // alias +#define LORA_IO1 LORA_IRQ // tied by diode to IO0 +#define LORA_IO2 LORA_IRQ // tied by diode to IO0 +#define LORA_RST NOT_A_PIN // select WIFI antenna (internal = onboard / external = u.fl socket) #define HAS_ANTENNA_SWITCH (21) // pin for switching wifi antenna (P12)