Inter-Integrated Circuit (I2C)
12.2.1.19 ROM_I2CMasterSlaveAddrSet
Sets the address that the I2C Master will place on the bus.
Prototype:
void
ROM_I2CMasterSlaveAddrSet(uint32_t ui32Base,
uint8_t ui8SlaveAddr,
bool bReceive)
ROM Location:
ROM_APITABLE is an array of pointers located at 0x0100.0010.
ROM_I2CTABLE is an array of pointers located at ROM_APITABLE[3].
ROM_I2CMasterSlaveAddrSet is a function pointer located at ROM_I2CTABLE[15].
Parameters:
ui32Base is the base address of the I2C Master module.
ui8SlaveAddr 7-bit slave address
bReceive flag indicating the type of communication with the slave
Description:
This function will set the address that the I2C Master will place on the bus when initiating a
transaction. When the bReceive parameter is set to true, the address will indicate that the
I2C Master is initiating a read from the slave; otherwise the address will indicate that the I2C
Master is initiating a write to the slave.
Returns:
None.
12.2.1.20 ROM_I2CMasterTimeoutSet
Sets the Master clock timeout value.
Prototype:
void
ROM_I2CMasterTimeoutSet(uint32_t ui32Base,
uint32_t ui32Value)
ROM Location:
ROM_APITABLE is an array of pointers located at 0x0100.0010.
ROM_I2CTABLE is an array of pointers located at ROM_APITABLE[3].
ROM_I2CMasterTimeoutSet is a function pointer located at ROM_I2CTABLE[33].
Parameters:
ui32Base is the base address of the I2C Master module.
ui32Value is the number of I2C clocks before the timeout is asserted.
Description:
This function enables and configures the clock low timeout feature in the I2C peripheral. This
feature is implemented as a 12-bit counter, with the upper 8-bits being programmable. For
example, to program a timeout of 20ms with a 100kHz SCL frequency, ui32Value would be
0x7d.
134 April 8, 2013