Greetings!
I'm interfacing EMR sensor with imx7 sabre board.
I have installed Yocto built Linux 4.9.88, now I'm trying to interface my device using .c programming. But I'm not getting any reference how to write a program in which I can generate Start condition, Stop condition, read Ack and read Data Byte, so that I can read x and y coordinate measured in the sensor.
I don't know how to use i2c-imx.c driver to execute a simple program, it will be great if anyone explains me step by step process. However, i2c-imx.c was missing in my kernel so I added it from an external source.
Hi Vikrant
description of linux i2c driver can be found in sect.4.7 Inter-IC (I2C)
attached Linux Manual, more documentation can be found on
May be more simple to test i2c with freertos examples:
i.MX 7Dual/Solo FreeRTOS BSP for Cortex-M4
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Igor,
I tried to execute user space application in the .c file for i2c interfacing, but I'm still not getting how to use i2c-imx.c driver file in my .c file in which I need to read sensor data for all available byte addresses.
Expecting the reply soon!
Hi Igor,
Thanks for valuable reply, but I already read description of linux i2c driver from Linux Ref. Manual.
I want to know how to use /drivers/i2c/busses/ i2c-lp-imx.c file, like compile or build .ko file.
Can you please tell me the process of doing so?
I am using Yocto built Linux 4.9.88 cause I need to connect EPD also.But still I will try with FreeRTOS BSP