
MOTOROLA
Appendix E. MPC8240 Drivers
E-43
Description:
Generate a START signal in the desired mode. Caller is the master. The slave_addr is
written to bits 7:1 of the I2CDR and bit 0 of the I2CDR is set to 0 for mode = XMIT or 1
for mode = RCV. A DLI-global variable MasterRcvAddress is set if mode = RCV (used by
I2C_ISR function).
I2CStatus I2C_Stop( unsigned int eumbbar );
eumbbar is the address of the Embedded Utilities Memory Block
Returns: Any defined status indicator
Description:
Generate a STOP signal to terminate the master transaction.
I2CStatus I2C_Master_Xmit( unsigned int eumbbar );
eumbbar is the address of the Embedded Utilities Memory Block
Returns: Any defined status indicator
Description:
Master sends one byte of data to slave receiver. The DLI global variables ByteToXmit,
XmitByte, and XmitBufEmptyStop are used to determine which data byte, or STOP, to
transmit. If a data byte is sent, it is written to the I2CDR. This function may only be called
when the following conditions are met: I2CSR.MIF = 1 I2CSR.MCF = 1 I2CSR.RXAK =
0 I2CCR.MSTA = 1 I2CCR.MTX = 1
I2CStatus I2C_Master_Rcv( unsigned int eumbbar );
eumbbar is the address of the Embedded Utilities Memory Block
Returns: Any defined status indicator
Description:
Master receives one byte of data from slave transmitter. The DLI global variables
ByteToRcv, RcvByte, and RcvBufFulStop are used to control the accepting of the data byte
or sending of a STOP if the buffer is full. This function may only be called when the
following conditions are met: I2CSR.MIF = 1 I2CSR.MCF = 1 I2CCR.MSTA = 1
I2CCR.MTX = 0
I2CStatus I2C_Slave_Xmit( unsigned int eumbbar );
NOTE
Untested.
eumbbar is the address of the Embedded Utilities Memory Block
Returns: I2CSUCCESS if data byte sent I2CBUFFEMPTY if no data in sending
buffer
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.