From a0dc2b5cfcbf156668dac45f22c3a9f979389390 Mon Sep 17 00:00:00 2001 From: Georgii Surkov Date: Mon, 18 Mar 2024 20:59:35 +0300 Subject: [PATCH] Fix DS1990 emulation --- lib/one_wire/one_wire_slave.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/one_wire/one_wire_slave.c b/lib/one_wire/one_wire_slave.c index 733b36e30..6fff75214 100644 --- a/lib/one_wire/one_wire_slave.c +++ b/lib/one_wire/one_wire_slave.c @@ -158,6 +158,8 @@ static inline bool onewire_slave_receive_and_process_command(OneWireSlave* bus) static inline bool onewire_slave_bus_start(OneWireSlave* bus) { FURI_CRITICAL_ENTER(); + + furi_hal_gpio_disable_int_callback(bus->gpio_pin); furi_hal_gpio_init(bus->gpio_pin, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow); while(onewire_slave_receive_and_process_command(bus)) @@ -166,6 +168,8 @@ static inline bool onewire_slave_bus_start(OneWireSlave* bus) { const bool result = (bus->error == OneWireSlaveErrorNone); furi_hal_gpio_init(bus->gpio_pin, GpioModeInterruptRiseFall, GpioPullNo, GpioSpeedLow); + furi_hal_gpio_enable_int_callback(bus->gpio_pin); + FURI_CRITICAL_EXIT(); return result;