Example i2c test
This procedure provides an overview of how to compile and run the i2c_test C example project. It assumes familiarity with the C programming language and is intended to be used by experienced programmers who are looking to learn the EMAC SDK.
Contents
1. Open the C/C++ editing perspective
2. Open the egpc project
3. Build, upload and run
What it does
This is an example test interface for reading/writing to the Linux I2C device interface. It is only relevant if the I2C device interface is enabled and an external I2C device is connected to the bus. See comments in i2c_test.c for details.
Usage for i2c_test
i2c_test
ie: ./i2c_test
A menu will appear in the terminal.
i2c menu
Select a function (a,b,c,d,e) to test or q to quit. You will be prompted for read, write and register values as appropriate. Test results will be displayed in the terminal.
For example:
i2c sample session