diff --git a/Kconfig b/Kconfig index 9ee3aa0..41791c7 100644 --- a/Kconfig +++ b/Kconfig @@ -24,3 +24,24 @@ config LORA32_DIO0_PIN default 26 help GPIO to handle DIO0 + +config LORA32_MISO_PIN + int "GPIO to handle MISO" + depends on LORA32_ENABLED + default 19 + help + GPIO to handle MISO + +config LORA32_MOSI_PIN + int "GPIO to handle MOSI" + depends on LORA32_ENABLED + default 27 + help + GPIO to handle MOSI + +config LORA32_CLK_PIN + int "GPIO to handle CLK" + depends on LORA32_ENABLED + default 5 + help + GPIO to handle CLK diff --git a/main/esp32-lora.c b/main/esp32-lora.c index 0d3fec1..c0f1641 100644 --- a/main/esp32-lora.c +++ b/main/esp32-lora.c @@ -16,9 +16,9 @@ #define READ_REG 0x7F #define WRITE_REG 0x80 -#define PIN_NUM_MISO 19 -#define PIN_NUM_MOSI 27 -#define PIN_NUM_CLK 5 +#define PIN_NUM_MISO CONFIG_LORA32_MISO_PIN +#define PIN_NUM_MOSI CONFIG_LORA32_MOSI_PIN +#define PIN_NUM_CLK CONFIG_LORA32_CLK_PIN #define PA_OUTPUT_RFO_PIN 0 #define PA_OUTPUT_PA_BOOST_PIN 1