i want using i2c to write eerom,but i do not find a SDK library function ,I need to give a specific address information to the saver,
also i need read a specific address information from the saver,but the LPI2C_DRV_MasterReceiveData can not do this, i do not know which function could using ,could you help me
Hi,
1) In order to send the data you need to use:
LPI2C_DRV_MasterSendDataBlocking(instance, txBuffer, txSize, true, timeout);
2) To receive data from a specific address you need first to send the command without sending stop and then requesting the required amount of data(This operation will send a repeated start on the bus). E.g.
LPI2C_DRV_MasterSendDataBlocking(instance, txBuffer, txSize, false, timeout);
LPI2C_DRV_MasterReceiveDataBlocking(instance, rxBuffer, rxSize, true, timeout);
Please fill the instance, txBuffer, txSize, timeout, rxBuffer and rxSize parameters according to your application.
Best regards,
Rares