Hi,
I am using NXP LPC1837 controller as a master and it is supposed to talk to other devices over I2C.
The firmware is based on Keil V5.
In the firmware code, I2C was initialized without defining a callback function as follows:
#include "Driver_I2C.h" #include "cmsis_os.h"
... some code....
ARM_DRIVER_I2C Driver_I2C0; ARM_DRIVER_I2C * I2C_drv = &Driver_I2C0;
I2C_drv->Initialize (NULL);
then when master transmits, the following code is used:
while (I2C_drv->GetStatus().busy); ret = I2C_drv->MasterTransmit(slave_addr, data_to_transmit, number_of_bytes, false); while (I2C_drv->GetStatus().busy);
the callback function is not defined but before and after master transmit, the I2C bus busy flag is checked.
Is this approach still considered as I2C interrupt? does this make the I2C communication mode as polling mode?
Thank you