mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 22:40:25 +00:00
[FL-3792] Fix iButton emulation regression (#3519)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
8bd984ff81
commit
169522cbe8
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue