Difference between revisions of "Example i2c test"

From wiki.emacinc.com
Jump to: navigation, search
(Created page with "{{todo|InProgress(11.14.13-12:14->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 examp...")
 
Line 18: Line 18:
  
 
ie: ./i2c_test
 
ie: ./i2c_test
A menu will appear.
 
  
 +
A menu will appear in the terminal.<br />
 
[[File:I2c test terminal menu.jpg|i2c menu]]
 
[[File:I2c test terminal menu.jpg|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:<br />
 +
[[File:i2c_test_terminal_samplesession.jpg|i2c sample session]]

Revision as of 14:24, 14 November 2013

TODO: {{#todo:InProgress(11.14.13-12:14->JG+)|Jgreene|oe 4,oe 5,ky,md,InProgress}}

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.

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