Merge remote-tracking branch 'OFW/gsurkov/3792_onewire_fix' into dev

This commit is contained in:
MX 2024-03-20 12:42:15 +03:00
commit 2276432745
No known key found for this signature in database
GPG Key ID: 7CCC66B7DBDD1C83

View File

@ -158,6 +158,8 @@ static inline bool onewire_slave_receive_and_process_command(OneWireSlave* bus)
static inline bool onewire_slave_bus_start(OneWireSlave* bus) { static inline bool onewire_slave_bus_start(OneWireSlave* bus) {
FURI_CRITICAL_ENTER(); FURI_CRITICAL_ENTER();
furi_hal_gpio_disable_int_callback(bus->gpio_pin);
furi_hal_gpio_init(bus->gpio_pin, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow); furi_hal_gpio_init(bus->gpio_pin, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
while(onewire_slave_receive_and_process_command(bus)) 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); const bool result = (bus->error == OneWireSlaveErrorNone);
furi_hal_gpio_init(bus->gpio_pin, GpioModeInterruptRiseFall, GpioPullNo, GpioSpeedLow); furi_hal_gpio_init(bus->gpio_pin, GpioModeInterruptRiseFall, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_enable_int_callback(bus->gpio_pin);
FURI_CRITICAL_EXIT(); FURI_CRITICAL_EXIT();
return result; return result;