You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, i2c_master_write and i2c_master_read returned I2C_OK if
first HAL call returned HAL_BUSY which was not correct.
Now make sure the i2c is ready, which guarantees a good
initialization of the read or write sequence.
Fixesstm32duino#1774
Signed-off-by: Frederic Pillon <[email protected]>
uint32_tXferOptions=obj->handle.XferOptions; // save XferOptions value, because handle can be modified by HAL, which cause issue in case of NACK from slave
858
859
#endif
859
-
860
+
do {
860
861
#if defined(I2C_OTHER_FRAME)
861
-
if (HAL_I2C_Master_Seq_Transmit_IT(&(obj->handle), dev_address, data, size, XferOptions)==HAL_OK) {
uint32_tXferOptions=obj->handle.XferOptions; // save XferOptions value, because handle can be modified by HAL, which cause issue in case of NACK from slave
932
948
#endif
933
-
949
+
do {
934
950
#if defined(I2C_OTHER_FRAME)
935
-
if (HAL_I2C_Master_Seq_Receive_IT(&(obj->handle), dev_address, data, size, XferOptions)==HAL_OK) {
0 commit comments