Hello TI experts,
I have a question about the driverlib in eusci_b_i2c.h. There are certain methods that come with a parameter for a timeout. For example, EUSCI_B_I2C_masterSendMultiByteFinishWithTimeout takes in an baseAddress, txData and a timeout. However, the documentation doesn't indicate what that final parameter of timeout means.
What does the timeout parameter mean in functions such as EUSCI_B_I2C_masterSendSingleByteWithTimeout, EUSCI_B_I2C_masterSendMultiByteFinishWithTimeout, EUSCI_B_I2C_masterSendMultiByteStopWithTimeout, EUSCI_B_I2C_masterReceiveMultiByteFinishWithTimeout, and so on.
Here's the documentation for one of these methods:
//*****************************************************************************
//
//! \brief Continues multi-byte transmission from Master to Slave with timeout
//!
//! This function is used by the Master module continue each byte of a multi-
//! byte transmission. This function transmits each data byte of a multi-byte
//! transmission to the slave.
//!
//! \param baseAddress is the base address of the I2C Master module.
//! \param txData is the next data byte to be transmitted
//! \param timeout is the amount of time to wait until giving up
//!
//! Modified bits of \b UCBxTXBUF register.
//!
//! \return STATUS_SUCCESS or STATUS_FAILURE of the transmission process.
//
//*****************************************************************************
extern bool EUSCI_B_I2C_masterSendMultiByteNextWithTimeout(uint16_t baseAddress,
uint8_t txData,
uint32_t timeout);
//***************************************************************************** // //! \brief Continues multi-byte transmission from Master to Slave with timeout //! //! This function is used by the Master module continue each byte of a multi- //! byte transmission. This function transmits each data byte of a multi-byte //! transmission to the slave. //! //! \param baseAddress is the base address of the I2C Master module. //! \param txData is the next data byte to be transmitted //! \param timeout is the amount of time to wait until giving up //! //! Modified bits of \b UCBxTXBUF register. //! //! \return STATUS_SUCCESS or STATUS_FAILURE of the transmission process. // //***************************************************************************** extern bool EUSCI_B_I2C_masterSendMultiByteNextWithTimeout(uint16_t baseAddress, uint8_t txData, uint32_t timeout);
In addition, I found a function EUSCI_B_I2C_setTimeout, but that function seems to be related to something else.