1.11.12.10 1.12.12.10 1.13.11.10 1.15.11.10 1.16.9.10 1.17.9.10 1.18.10.10 1.19.9.10 1.20.9.10 1.21.10.10 1.22.14.10 1.23.13.10 1.24.11.10 I2Cx_IsBusy Function
C
/* x = I2C instance number */
/* I2C master mode and slave mode */
bool I2Cx_IsBusy(void)
Summary
Returns the Peripheral busy status.
Description
I2C master mode
In master mode, this function returns true if the I2Cx module is busy with a transfer. The application can use this function to check if I2Cx module is busy before calling any of the data transfer functions. The library does not allow a data transfer operation if another transfer operation is already in progress.
I2C slave mode
In slave mode, the function returns true if a start bit has been detected last on the bus by the peripheral. The application can use this API to ensure no I2C transfer is in progress.
Precondition
I2Cx_Initialize must have been called for the associated I2C instance.
Parameters
None.
Returns
true - Busy
false - Not busy
Example
// wait for the current transfer to complete while(I2C1_IsBusy());
Remarks
None.