The I2C ROM driver requires specific variables to be declared and initialized for proper usage. Depending on the operating mode, some variables can be omitted.
The I2C handle is a pointer allocated for the I2C ROM driver. The handle needs to be defined as an I2C handle TYPE:
typedef void* I2C_HANDLE_T-->
After the definition of the handle, the handle must be initialized with I2C base address and RAM reserved for the I2C ROM driver by making a call to the i2c_setup() function.
The callback function type must be defined if interrupts for the I2C ROM driver are used:
typedef void (*I2C_CALLBK_T) (uint32_t err_code,uint32_t n)-->
The callback function will be called by the I2C ROM driver upon completion of a task when interrupts are used.
© NXP N.V. 2014. All rights reserved.