make it work!
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user