Skip to content

Commit 5f95b95

Browse files
ghent360fpistm
authored andcommitted
Fix assert_param in I2C HAL.
1 parent a4e0ff1 commit 5f95b95

File tree

1 file changed

+2
-2
lines changed
  • libraries/Wire/src/utility

1 file changed

+2
-2
lines changed

libraries/Wire/src/utility/twi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ void i2c_custom_init(i2c_t *obj, uint32_t timing, uint32_t addressingMode, uint3
694694

695695
handle->Instance = obj->i2c;
696696
#ifdef I2C_TIMING
697-
handle->Init.Timing = i2c_getTiming(obj, timing);
697+
handle->Init.Timing = i2c_getTiming(obj, timing);
698698
#else
699699
handle->Init.ClockSpeed = i2c_getTiming(obj, timing);
700700
/* Standard mode (sm) is up to 100kHz, then it's Fast mode (fm) */
@@ -706,7 +706,7 @@ void i2c_custom_init(i2c_t *obj, uint32_t timing, uint32_t addressingMode, uint3
706706
}
707707
#endif
708708
handle->Init.OwnAddress1 = ownAddress;
709-
handle->Init.OwnAddress2 = 0xFF;
709+
handle->Init.OwnAddress2 = 0;
710710
handle->Init.AddressingMode = addressingMode;
711711
handle->Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
712712
handle->Init.GeneralCallMode = (obj->generalCall == 0) ? I2C_GENERALCALL_DISABLE : I2C_GENERALCALL_ENABLE;

0 commit comments

Comments
 (0)