Difference between revisions of "Example i2c test"
Line 1: | Line 1: | ||
− | {{todo|InProgress(11.14.13- | + | {{todo|InProgress(11.14.13-13:25->JG+)|Jgreene|project=oe 4,oe 5,ky,md,InProgress}} |
<big>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.</big> | <big>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.</big> | ||
Line 24: | Line 24: | ||
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. | 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. | ||
− | + | The is an example session:<br /> | |
[[File:i2c_test_terminal_samplesession.jpg|i2c sample session]] | [[File:i2c_test_terminal_samplesession.jpg|i2c sample session]] |
Revision as of 13:26, 14 November 2013
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.
The is an example session:
i2c sample session