5 Replies Latest reply on Oct 10, 2019 8:24 PM by AH_96

    Callback function on I2C master/slave transfer complete

    SaGh_4441651

      I want a callback function that is called once the I2C master is done sending all the bytes. I came across 2 options that I maybe able to use -

       

      I2C_1_I2C_ISR_ExitCallback() or I2C_1_SetMasterInterruptMode(I2C_1_INTR_MASTER_I2C_STOP) or I2C_1_I2C_MSTAT_RD_CMPLT;

       

      What is the difference between the two? And which one should I be using?

       

      Also, I need to set some flags indicating slave's status. For this I also came across I2C_1_I2C_SSTAT_RD_CMPLT (& other flag bits), I2C_1_I2C_SlaveCompleteCallback and I2C_1_SetSlaveInterruptMode. What is the differnce between all these methods?