Inter-Integrated Circuit (I2C)
using ROM_I2CMasterErr(). If there are no errors, then the data has been sent or is
ready to be read using ROM_I2CMasterDataGet(). For the burst send and receive cases,
the polling method also involves calling the ROM_I2CMasterControl() function for each
byte transmitted or received (using either the I2C_MASTER_CMD_BURST_SEND_CONT
or I2C_MASTER_CMD_BURST_RECEIVE_CONT commands), and for the last byte
sent or received (using either the I2C_MASTER_CMD_BURST_SEND_FINISH or
I2C_MASTER_CMD_BURST_RECEIVE_FINISH commands). If any error is detected
during the burst transfer, the ROM_I2CMasterControl() function should be called using
the appropriate stop command (I2C_MASTER_CMD_BURST_SEND_ERROR_STOP or
I2C_MASTER_CMD_BURST_RECEIVE_ERROR_STOP).
For the interrupt-driven transaction, the user must register an interrupt handler for the I2C devices
and enable the I2C master interrupt; the interrupt will occur when the master is no longer busy.
12.2 Functions
Functions
bool ROM_I2CMasterBusBusy (uint32_t ui32Base)
bool ROM_I2CMasterBusy (uint32_t ui32Base)
void ROM_I2CMasterControl (uint32_t ui32Base, uint32_t ui32Cmd)
uint32_t ROM_I2CMasterDataGet (uint32_t ui32Base)
void ROM_I2CMasterDataPut (uint32_t ui32Base, uint8_t ui8Data)
void ROM_I2CMasterDisable (uint32_t ui32Base)
void ROM_I2CMasterEnable (uint32_t ui32Base)
uint32_t ROM_I2CMasterErr (uint32_t ui32Base)
void ROM_I2CMasterInitExpClk (uint32_t ui32Base, uint32_t ui32I2CClk, bool bFast)
void ROM_I2CMasterIntClear (uint32_t ui32Base)
void ROM_I2CMasterIntClearEx (uint32_t ui32Base, uint32_t ui32IntFlags)
void ROM_I2CMasterIntDisable (uint32_t ui32Base)
void ROM_I2CMasterIntDisableEx (uint32_t ui32Base, uint32_t ui32IntFlags)
void ROM_I2CMasterIntEnable (uint32_t ui32Base)
void ROM_I2CMasterIntEnableEx (uint32_t ui32Base, uint32_t ui32IntFlags)
bool ROM_I2CMasterIntStatus (uint32_t ui32Base, bool bMasked)
uint32_t ROM_I2CMasterIntStatusEx (uint32_t ui32Base, bool bMasked)
uint32_t ROM_I2CMasterLineStateGet (uint32_t ui32Base)
void ROM_I2CMasterSlaveAddrSet (uint32_t ui32Base, uint8_t ui8SlaveAddr, bool bReceive)
void ROM_I2CMasterTimeoutSet (uint32_t ui32Base, uint32_t ui32Value)
void ROM_UpdateI2C (void)
12.2.1 Function Documentation
12.2.1.1 ROM_I2CMasterBusBusy
Indicates whether or not the I2C bus is busy.
124 April 8, 2013