From 1dac9519181978fbce34a4d0a0aea8702e282e47 Mon Sep 17 00:00:00 2001 From: Winford Date: Sat, 13 Dec 2025 21:39:08 +0000 Subject: [PATCH] Fix acquisition of gpio port Fixes a potential conflict if the gpio port driver is started before the lora driver for the sx127x module. Closes #7 Signed-off-by: Winford --- src/lora_sx127x.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lora_sx127x.erl b/src/lora_sx127x.erl index 67140a0..401fd75 100644 --- a/src/lora_sx127x.erl +++ b/src/lora_sx127x.erl @@ -223,7 +223,7 @@ init_lora(SPI, Config) -> ok = set_mode(SPI, standby), - GPIO = gpio:open(), + GPIO = gpio:start(), ok = maybe_set_irq(SPI, GPIO, get_irq(Config)), ok = maybe_reset(GPIO, maps:get(reset, Config, undefined)).