Ver Fonte

Bugfix: Adressierung basierend auf Pins funktioniert jetzt

Heinrich Blatt há 7 meses atrás
pai
commit
3b812b4c08
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      src/interfaces/i2c_target.c

+ 2 - 1
src/interfaces/i2c_target.c

@@ -25,7 +25,8 @@ void initialize_target_address() {
     if (DL_GPIO_readPins(GPIOS_PORT, GPIOS_ADDR_PIN)) {
         add = 1;
     }
-    DL_I2C_setTargetAddress(I2C_target_INST, I2C_TARGET_BASE_ADDRESS+add);
+    DL_I2C_setTargetOwnAddress(I2C_target_INST, I2C_TARGET_BASE_ADDRESS+add);
+    DL_I2C_enableTargetOwnAddress(I2C_target_INST);
 }
 
 /*Function to Rx and Tx data from Target to Controller*/