Tool/software: TI-RTOS
Hello everyone,
I'm trying to read sensor (acc/gyro) data from my sensortag CC1350 using I2C every 10 ms, therefore i'm using a timer.
In the timer callback function im calling SensorMpu9250_accRead(accData); which uses the I2C_transfer function.
the function returns zero data, mostly because of the callback context, because it's called from timer callback function (however the transfer works in the task context)
what do you think the solution for this problem?
I read that i could change I2C_transfer to callback mode in the I2C_open like:
params.transferCallbackFxn = someI2CCallbackFunction;
but what is "someI2CCallbackFunction" in this case ?? is it the same callback function of the TIMER ?
What should i put inside "someI2CCallbackFunction" if its not the same as the callback function of the timer ?
Best regards