Browse Source

[FL-1137] one_wire_slave: disable exti interrupt after emulation (#412)

Co-authored-by: あく <alleteam@gmail.com>
gornekich 4 years ago
parent
commit
b4addbdade
1 changed files with 5 additions and 0 deletions
  1. 5 0
      lib/onewire/one_wire_slave.cpp

+ 5 - 0
lib/onewire/one_wire_slave.cpp

@@ -20,6 +20,11 @@ void OneWireSlave::start(void) {
 void OneWireSlave::stop(void) {
     // deinit gpio
     gpio_init_ex(one_wire_pin_record, GpioModeInput, GpioPullNo, GpioSpeedLow);
+    // TODO change after gpio rework
+    // Clear EXTI registers
+    LL_EXTI_DisableRisingTrig_0_31(LL_EXTI_LINE_14);
+    LL_EXTI_DisableFallingTrig_0_31(LL_EXTI_LINE_14);
+    LL_EXTI_DisableIT_0_31(LL_EXTI_LINE_14);
 
     // remove exti interrupt
     api_interrupt_remove(exti_cb, InterruptTypeExternalInterrupt);