1.8.7.65 1.25.6.65 1.26.5.65 1.27.5.65 1.28.6.65 1.36.7.63 1.41.5.65 1.42.3.65 FLEXCOMx_TWI_IsBusy Function
C
/* x = FLEXCOM instance number */
/* TWI master mode and slave with interrupt enabled */
bool FLEXCOMx_TWI_IsBusy(void)
Summary
Returns the Peripheral busy status
Description
TWI master mode
In master mode, this function returns true if the FLEXCOMx TWI module is busy with a transfer. The application can use this function to check if FLEXCOMx TWI 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.
TWI slave mode
In slave mode, the function returns true as soon as the address match event occurs and returns false after a STOP bit has been detected. The application can use this API to ensure no TWI transfer is in progress.
Precondition
FLEXCOMx_TWI_Initialize must have been called for the associated FLEXCOM instance.
Parameters
None.
Returns
true - Busy
false - Not busy
Example
// wait for the current transfer to complete while(FLEXCOM0_TWI_IsBusy());
Remarks
None