1.3.2.4.7 I2C_BB_IsBusy Function
C
bool I2C_BB_IsBusy(void)
Summary
Returns the state of the library
Description
This function returns if the library is busy performing a read/write operation.
This API can be used to poll for the state of library if no callback is registered.
Precondition
I2C_BB_Initialize must have been called for the associated I2C instance.
Parameters
None.
Returns
true - If busy performing Read or Write operation
false - If ready to accept new Read or Write request
Example
I2C_BB_Initialize();
if(I2C_BB_WriteRead( SLAVE_ADDR, &myTxData[0], NUM_TX_BYTES, myRxData, NUM_RX_BYTES ) == false)
{
// error handling
}
while (I2C_BB_IsBusy() == true)
{
//I2C transfer is in progress
}
Remarks
None.