Difference between revisions of "Example getkey"

From wiki.emacinc.com
Jump to: navigation, search
(Created page with "{{todo|InProgress(11.14.13-11:04->JG+)|Jgreene|project=oe 4,oe 5,ky,md,InProgress}}")
 
Line 1: Line 1:
 
{{todo|InProgress(11.14.13-11:04->JG+)|Jgreene|project=oe 4,oe 5,ky,md,InProgress}}
 
{{todo|InProgress(11.14.13-11:04->JG+)|Jgreene|project=oe 4,oe 5,ky,md,InProgress}}
 +
<big>This procedure provides an overview of how to compile and run the ''getkey'' 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>
 +
 +
====1. Open the ''C/C++'' editing perspective====
 +
 +
====2. Open the ''egpc'' project====
 +
 +
====3. Build, upload and run====
 +
<br /><br />
 +
 +
==What it does==
 +
 +
This is an example program for mapping keypad input to a character matrix using the keypad interface on the SOM-150ES. It requires a SOM-150ES board and the keypad that goes with it.
 +
 +
'''Usage for getkey:'''<br />                               
 +
getkey [-d device -b -g -s file]<br />
 +
d: specify the device node, default is ''/dev/keypad''<br />
 +
b: read blocking, sleep until a key is pressed.<br />   
 +
g: get matrix returns the current keypad matrix.<br />       
 +
s: sets the keypad matrix to the matrix specified in file (see project for example file ''Key-E020-21'').<br />
 +
If a matrix operation is not specified then the last key pressed is returned.<br />
 +
Note:<br />
 +
Arguments are evaluated in order. If blocking or device specifications are used, they must be declared before the matrix arguments on the command line.
 +
 +
i.e. : ./getkey -d /dev/keypad0 -b

Revision as of 12:20, 14 November 2013

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

This procedure provides an overview of how to compile and run the getkey 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 program for mapping keypad input to a character matrix using the keypad interface on the SOM-150ES. It requires a SOM-150ES board and the keypad that goes with it.

Usage for getkey:
getkey [-d device -b -g -s file]
d: specify the device node, default is /dev/keypad
b: read blocking, sleep until a key is pressed.
g: get matrix returns the current keypad matrix.
s: sets the keypad matrix to the matrix specified in file (see project for example file Key-E020-21).
If a matrix operation is not specified then the last key pressed is returned.
Note:
Arguments are evaluated in order. If blocking or device specifications are used, they must be declared before the matrix arguments on the command line.

i.e. : ./getkey -d /dev/keypad0 -b