
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
422 of 487
NXP Semiconductors
UM10800
Chapter 29: LPC82x ROM API I2C driver routines
29.4.16 I2C Get Firmware Version
29.4.17 I2C Get Status
29.4.18 I2C time-out value
29.4.19 Error codes
Table 380. I2C Get Firmware Version
Routine
I2C Get Firmware Version
Prototype
uint32_t i2c_get_firmware_version(void )
Input parameter
None.
Return
I2C ROM Driver version number.
Description
Returns the version number. The firmware version is an unsigned 32-bit
number.
Table 381. I2C Get Status
Routine
I2C Get Status
Prototype
I2C_MODE_T i2c_get_status(I2C_HANDLE_T* )
Input parameter
I2C_HANDLE_T - Handle to the allocated SRAM area.
Return
Status code.
Description
Returns status code. The status code indicates the state of the I2C bus.
Refer to I2C Status Code Table.
Table 382. I2C time-out value
Routine
I2C time-out value
Prototype
ErrorCode_t i2c_set_timeout(I2C_HANDLE_T* h_i2c, uint32_t timeout)
Input parameter
I2C_HANDLE_T - Handle to the allocated SRAM area.
uint32_t timeout - time value is timeout*16 i2c function clock. If timeout = 0,
timeout feature is disabled.
Return
Status code.
Description
Returns status code. The status code indicates the state of the I2C bus.
Refer to I2C Status Code Table.
Table 383. Error codes
Error Code
Description
Comment
0
Successful completion
Function was completed successfully.
1
General error
-
0x0006 0001
ERR_I2C_NAK
-
0x0006 0002
ERR_I2C_BUFFER_OVERFLOW
-
0x0006 0003
ERR_I2C_BYTE_COUNT_ERR
-
0x0006 0004
ERR_I2C_LOSS_OF_ARBRITRATION
-
0x0006 0005
ERR_I2C_SLAVE_NOT_ADDRESSED
-
0x0006 0006
ERR_I2C_LOSS_OF_ARBRITRATION_NAK_BIT -
0x0006 0007
ERR_I2C_GENERAL_FAILURE
Failure detected on I2C bus.