I'm a beginner in the NXP world and I can't understand a problem that I have with I2C. I'm using the FRDM KL25Z with the NXP gyroscope FXAS21002C. I found a library on the internet and everything it's ok, but I would like to develop my library to enable me to use the OHIBOARD library on gitHub GitHub - ohilab/libohiboard: OHIBoard library . The problem is that I'm not able to send a repeated start as you can see in the picture below. I have checked everything and the only difference I found is that on the internet library I have this line to send a repeated start:
I2C1_C1 |= I2C_C1_RSTA_MASK;
while in the OHILAB there is this one:
I2C_C1_REG(dev->regMap) |= I2C_C1_RSTA_MASK;
I attach the main.c and the library I wrote.
Can anybody help me?
Original Attachment has been moved to: FXAS21002C.c.zip
Original Attachment has been moved to: FXAS21002C.h.zip