Hallo,
I am bit confusing with I2C master send function and receive functions.
/*!
* @brief Perform a non-blocking receive transaction on the I2C bus
*
* This function starts the reception of a block of data from the currently
* configured slave address and returns immediately.
* The rest of the reception is handled by the interrupt service routine.
* Use LPI2C_DRV_MasterGetReceiveStatus() to check the progress of the reception.
*
* @param instance LPI2C peripheral instance number
* @param rxBuff pointer to the buffer where to store received data
* @param rxSize length in bytes of the data to be transferred
* @param sendStop specifies whether or not to generate stop condition after the reception
* @return Error or success status returned by API
*/
status_t LPI2C_DRV_MasterReceiveData(uint32_t instance,
uint8_t * rxBuff,
uint32_t rxSize,
bool sendStop);
How can I read data without Writing address on the slave with LPI2C_DRV_MasterReceiveData function??
How can I differentiate Read or Write operation with this function.
Please give example codes for this requirements
I want to write configuration register to ADXL345
I want to read X,Y and Z axis data from ADXL345
Best Regards,
Sai
@danielmartynek