
E-42
DINK32 PowerPC ISA Debugger User’s Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
MPC8240 I2O Doorbell Driver
0 - this is a not restart, check MBB
Returns: Any defined status indicator
Description:
Set up to receive a buffer of data from the desired sender_addr. If stop_flag is set, when the
buffer is full and the sender does not signal STOP, generate a STOP signal. Caller is the
master performing receiving. If no STOP signal is generated, the master can generate a
START signal to another slave address.
NOTE
The function does not actually perform the data buffer receive,
it just sets up the DLI global variables to control the transaction
and calls I2C_Start to send the slave address out on the I2C bus
in receive mode. The application must check the return status
to find out if the bus was obtained, then enter a loop of calling
I2C_Timer_Event to poll the I2C handler to actually perform
the transaction one byte at a time, while checking the return
status to determine if there were any errors and if the
transaction has completed.
I2CStatus I2C_Timer_Event( unsigned int eumbbar, I2CStatus (*handler)( unsigned
int ) );
eumbbar is the address of the Embedded Utilities Memory Block
handler is a pointer to the function to call to handle any existing status event,
Returns: I2CNOEVENT if there is no completed event, the I2CSR MIF bit is not set
results from call to the handler function if there was a pending event completed
Description:
In polling mode, I2C_Timer_Event can be called to check the I2C status and call the given
(or the default: I2C_ISR) handler function if the I2CSR MIF bit is set.
I2CStatus I2C_Start( unsigned int eumbbar,
unsigned char slave_addr,
I2C_MODE mode,
unsigned int is_cnt );
eumbbar is the address of the Embedded Utilities Memory Block
slave_addr is the I2C address of the receiver
mode: XMIT(1) - put (write)
RCV(0) - get (read)
is_cnt: 1 - this is a restart, don't check MBB
0 - this is a not restart, check MBB
Returns: Any defined status indicator
F
n
.