This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
bool I2C_transfer ( I2C_Handle handle, I2C_Transaction * transaction ) Perform an I2C transaction with an I2C slave peripheral. This function will perform an I2C transfer, as specified by an I2C_Transaction structure. Note When using I2C_MODE_BLOCKING, this must be called from a thread context. Parameters [in] handle An I2C_Handle returned from I2C_open() [in] transaction A pointer to an I2C_Transaction. The application is responsible for allocating and initializing an I2C_Transaction structure prior to passing it to I2C_Transfer(). This structure must persist in memory unmodified until the transfer is complete. Note I2C_Transaction structures cannot be re-used until the previous transaction has completed. Upon the completion of a transaction, the I2C_Transaction.status may be used for error handling. Returns In I2C_MODE_BLOCKING: true for a successful transfer; false for an error (for example, an I2C bus fault (NACK)). In I2C_MODE_CALLBACK: always true. The I2C_CallbackFxn bool argument will be true to indicate success, and false to indicate an error.