ButtonReader v1.0

Introduction
------------

This program is designed to read button presses on the iRex iLiad
and print the information to stdout.  It is typically run from the command
line.

To exit the program cleanly, press the "Escape" (up a level) button.
Otherwise you can kill it with ctrl-c from the command line.

This program can be run in parallel with the ContentLister, but bear in mind
that it will not (usually) block the ContentLister's reading of buttons, so
any presses of the iDS connect button, the power button, etc. will have their
usual effect.  To prevent this, you can kill the ContentLister process.

The program checks for a button press every 1/10th of a second, the same rate
as the ContentLister.  Because of this, if you hold a button for more than
1/10 of a second, you will see multiple "key pressed" outputs.

You will not see any "long press" output.  This is because there is no hardware
definition of a "long press".  The long-press key signals are created by
software, when the ContentLister detects that a button has been held longer
than the specified time.


Compiling
---------

To compile this program you will need at least a basic software development
kit for the arm architecture.  The official iRex iLiad SDK is overkill for
this simple program, but works well.  It can be found at:

http://developer.irexnet.com/pub/Toolchain/

Once you have installed the toolkit, compiling is as simple as:

$ cd ButtonReader
$ arm-linux-gcc -o ButtonReader buttonReader-1.0.c

An executable ButtonReader is included with this distribution. It can be run
from the command line on the iLiad, or via a script if you like.


Warranty and Copyright
----------------------

ButtonReader v1.0 is written by, and Copyright 2007 by John C. Harker.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

The GNU GPL version 3 should be located in the file named COPYING.

I give no warranty for the fitness of this program, and there is no guarantee
that it will not brick your iLiad, corrupt files, or cause physical damage.
Use at your own risk!  Do not use this program if you don't know what you're
doing!

The author can be reached by email at John.C.Harker <at> gmail.com.
