make it work!

This commit is contained in:
2022-04-02 03:54:53 +02:00
parent fdcac81021
commit 01a18ef9cb
11 changed files with 247 additions and 10 deletions
@@ -6356,12 +6356,13 @@ static void I2C_Slave_STOPF(I2C_HandleTypeDef *hi2c)
if (hi2c->XferCount != 0U)
{
/* Set ErrorCode corresponding to a Non-Acknowledge */
hi2c->ErrorCode |= HAL_I2C_ERROR_AF;
/* Set ErrorCode corresponding to a Non-Acknowledge */
hi2c->ErrorCode |= HAL_I2C_ERROR_AF;
}
}
if (hi2c->ErrorCode != HAL_I2C_ERROR_NONE)
// HACK - ignore HAL_I2C_ERROR_AF
if (hi2c->ErrorCode != HAL_I2C_ERROR_NONE && hi2c->ErrorCode != HAL_I2C_ERROR_AF)
{
/* Call the corresponding callback to inform upper layer of End of Transfer */
I2C_ITError(hi2c);