Преглед на файлове

Bugfix: Strom setzen funktioniert jetzt

Heinrich Blatt преди 6 месеца
родител
ревизия
8c9864261d
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      main_target.c

+ 4 - 1
main_target.c

@@ -79,7 +79,10 @@ void I2C_target_INST_IRQHandler(void) {
   case DL_I2C_IIDX_TARGET_STOP:
     break;
   case DL_I2C_IIDX_TARGET_RXFIFO_TRIGGER:
-    handle_read_pending_slot = mcu_i2c_handle(I2C_target_INST);
+    // only use this function if we are async (filling buffers) - the rest is handled by the mainloop
+    if (handle_read_pending_slot == -1) {
+        handle_read_pending_slot = mcu_i2c_handle(I2C_target_INST);
+    }
     break;
   case DL_I2C_IIDX_TARGET_TXFIFO_TRIGGER:
     break;