nanogui: problems reading the buttons on the helio in VR Linux
Subject:
problems reading the buttons on the helio in VR Linux
From:
Robert Hartley ####@####.####
Date:
29 Dec 2000 13:23:11 -0000
Message-Id: <3A4C90FA.43CA2441@ics.com>
Hello,
I whipped up the attached test file to try reading the button keys on
the Helio running VR Linux from TVT. (pocketlinux)
It keeps telling me that it cannot open the file /dev/r39xxbuttons
I tested the same file by creating a named pipe using mknod called
/dev/r39xxbuttons on a standard RH v6.2 Intel system that worked.
What am I doing wrong?
(Is there already a process that has this file open?)
thanks for your help,
Robert
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
= Robert Hartley Mail: 201 Broadway =
= Central Region Systems Engineer Cambridge, MA 02139 =
= Integrated Computer Email: ####@####.#### =
= Solutions, Inc. Web Site: www.ics.com =
= Tech Support: ####@####.#### Phone: 800-800-4271 =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Visit the MotifZone (www.motifzone.org) for info on Motif!
/*
Simple button test program built with the following two lines:
mipsel-linux-gcc -static helio-test.c -o helio-test
mipsel-linux-strip helio-test
*/
#include <stdio.h>
#include <fcntl.h>
char *button_fn = "/dev/r39xxbuttons";
char ch;
int main(int argc, char *argv[])
{
int fd = open(button_fn, O_RDONLY);
if(fd == -1)
{
fprintf(stderr, "Unable to open file: %s\n", button_fn);
exit(0);
}
while(read(fd, &ch, 1) > 0)
{
fprintf(stderr, "ch = %c = (int) %d\n", ch, (int) ch);
}
close(fd);
fprintf(stderr, "Finished reading.\n");
} /* main() */