2021-02-24 04:46 AM
i have do all setting right but not work
this is link photo to know what i add setting
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
if (GPIO_Pin == GPIO_PIN_0)
{
// WHEN PRESS SEND VECTOR BY INTERRUPT
for (uint8_t i=0;i<10;i++)
TxBuffer[i]++;
HAL_I2C_Master_Transmit_IT(&hi2c1, I2C_ADDRESS, (uint8_t*)TxBuffer, 10);
}
}
void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c)
{
if (hi2c->Instance == I2C1)
{
SendsCount++;
}
}
/* USER CODE END 4 */