I am configuring STM32L496ZGP as an I2C Slave. Master is a software(i.e.)Aardvark Total Phase Control Center and I am sending some data for this I2C Slave to receive.
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_I2C2_Init();
if(HAL_I2C_EnableListen_IT(&hi2c2)!=HAL_OK)
{
Error_Handler();
}
while (1) {
}
}
void HAL_I2C_ListenCpltCallback(I2C_HandleTypeDef *hi2c)
{
HAL_I2C_EnableListen_IT(&hi2c2);
}
void HAL_I2C_AddrCallback(I2C_HandleTypeDef *hi2c,uint8_t TransferDirection,uint16_t AddrMatchCode)
{
if(TransferDirection==I2C_DIRECTION_TRANSMIT)
{
HAL_I2C_Slave_Seq_Receive_IT(hi2c, i2c_rec, 10,I2C_FIRST_AND_LAST_FRAME);
-------->HAL_I2C_Slave_Receive(hi2c, i2c_rec, 1, HAL_MAX_DELAY);
-------->HAL_I2C_Slave_Receive_IT(hi2c, i2c_rec, 10);
}
else
Error_Handler();
}
void HAL_I2C_SlaveRxCpltCallback(I2C_HandleTypeDef *hi2c)
{
....
}
My question is why I am unable to use the arrowed line --------> functions, which is inside HAL_I2C_AddrCallback?
Why _Seq_ function is needed to send or receive in here.? Unable to understand the difference between functions which have (_Seq_) and other functions. HAL_I2C_Slave_Seq_Receive_IT() and HAL_I2C_Slave_Receive_IT() difference?