소스 검색

Bugfix: Adressierung basierend auf Pins funktioniert jetzt

Heinrich Blatt 7 달 전
부모
커밋
3b812b4c08
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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*/