Im trying to make a RSL10-sense-db-gevk interface with the sensor HTS221, using i2c.
At first, i’ve made the sensor communicate with an Arduino, using a pre built library, and it worked fine, so i know the library and the sensor works.
So i’ve downloaded the ONsemi IDE and all the required drivers, including drivers for the debugging, then i’ve copied the i2c_cmsis_driver code to start with, and after some studying, i’ve found out that i have to use the “i2c->MasterTransmit” and “i2c->MasterReceive” functions to communicate with the sensor, because i want the rsl10 to be the master and the HTS221 to be the slave.
Then, i’ve copied all the hts221 arduino library and ported all the functions to make them work with the rsl10.
The thing is, it doesnt work, and after putting a PRINTF to show whats going on the i2c, i saw that i am not getting any data from it,
Do you know what i am doing wrong? I’ve setup the i2c as master and i thinkg i am using the driver correctly.
I’ve attached the app.c file.