Przeglądaj źródła

Bugfix auf dem ADC: Das erste Kommando funktioniert jetzt direkt (buffer geleert)

Heinrich Blatt 7 miesięcy temu
rodzic
commit
e4aa74cb79
2 zmienionych plików z 1 dodań i 1 usunięć
  1. 0 1
      main_target.c
  2. 1 0
      src/interfaces/i2c_target.c

+ 0 - 1
main_target.c

@@ -79,7 +79,6 @@ void I2C_target_INST_IRQHandler(void) {
   case DL_I2C_IIDX_TARGET_STOP:
     mcu_CommandPending= true;
     DL_I2C_flushTargetTXFIFO(I2C_target_INST);
-    DL_I2C_flushTargetRXFIFO(I2C_target_INST);
     break;
   case DL_I2C_IIDX_TARGET_RXFIFO_TRIGGER:
     if (DL_I2C_isTargetRXFIFOEmpty(I2C_target_INST)) {

+ 1 - 0
src/interfaces/i2c_target.c

@@ -113,4 +113,5 @@ void mcu_i2c_handle(I2C_Regs *i2c) {
         }
         *battery_slots[slot].state = SLOT_STATE_OK;
     }
+    DL_I2C_flushTargetRXFIFO(i2c);
 }