DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
DRAFT
D
RAFT
DRA
UM10601
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
Preliminary user manual
Rev. 1.0 — 7 November 2012
274 of 313
NXP Semiconductors
UM10601
Chapter 23: LPC800 I2C-bus ROM API
23.4.10 I2C Slave Receive Interrupt
23.4.11 I2C Slave Transmit Interrupt
23.4.12 I2C Set Slave Address
23.4.13 I2C Get Memory Size
Table 260. I2C Slave Receive Interrupt
Routine
I2C Slave Receive Interrupt
Prototype
ErrorCode_t i2c_slave_receive_intr(I2C_HANDLE_T* , I2C_PARAM* ,
I2C_RESULT*)
Input parameter
I2C_HANDLE_T - Handle to the allocated SRAM area.
I2C_PARAM - Pointer to the I2C PARAM struct.
I2C_RESULT - Pointer to the I2C RESULT struct.
Return
ErrorCode.
Description
Receives data from master. Program control will be returned immediately and
task will be completed on an interrupt-driven basis. When task is completed,
the callback function is called.
Table 261. I2C Slave Transmit Interrupt
Routine
I2C Slave Transmit Interrupt
Prototype
ErrorCode_t i2c_slave_transmit_intr(I2C_HANDLE_T* , I2C_PARAM* ,
I2C_RESULT*)
Input parameter
I2C_HANDLE_T - Handle to the allocated SRAM area.
I2C_PARAM - Pointer to the I2C PARAM struct.
I2C_RESULT - Pointer to the I2C RESULT struct.
Return
ErrorCode.
Description
Sends data to the Master. Program control will be returned immediately and
task will be completed on an interrupt-driven basis. When task is completed,
the callback function is called.
Table 262. I2C Set Slave Address
Routine
I2C Set Slave Address
Prototype
ErrorCode_t i2c_set_slave_addr(I2C_HANDLE_T*, slave_addr_0_3,
slave_mask_0_3)
Input parameter
I2C_HANDLE_T - Handle to the allocated SRAM area.
Slave_addr_0_3 - unint32 variable. 7-bit slave address .
Slave_mask_0_3 - unint32 variable. Slave address mask.
Return
ErrorCode.
Description
Sets the slave address and associated mask. The set_slave_addr() function
supports four 7-bit slave addresses and masks.
Table 263. I2C Get Memory Size
Routine
I2C Get Memory Size
Prototype
uint32_t i2c_get_mem_size(void)