spark_fp: add option to find out the frontpanel type

this needs my latest patched aotom driver again...


Origin commit data
------------------
Branch: master
Commit: 4c0541ac28
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-09-11 (Tue, 11 Sep 2012)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2012-09-11 15:12:28 +02:00
parent 791c592fe1
commit 0ed8fd60c3

View File

@@ -38,6 +38,7 @@ void usage()
{
printf("usage spark_fp <option>\n");
printf("\t-g: get wakeup reason (return code == reason)\n");
printf("\t-T: get FP display type (1 = VFD, 2 = LCD, 4 = LED, 8 = LBD)\n");
printf("\t-t: get current FP time\n");
printf("\t-s <time>: set FP time (time = 0: use current time)\n");
printf("\t-w <time>: set FP wakeup time and power down (time = 1: no wakeup)\n");
@@ -135,7 +136,7 @@ int main(int argc, char **argv)
}
ret = 0;
while ((c = getopt (argc, argv, "gs:tw:")) != -1)
while ((c = getopt (argc, argv, "gs:tw:T")) != -1)
{
switch (c)
{
@@ -219,6 +220,16 @@ int main(int argc, char **argv)
*/
sleep(2); /* not reached... */
break;
case 'T':
ret = ioctl(fd, VFDGETVERSION, &val);
if (ret < 0)
perror("ioctl VFDGETVERSION");
else
{
printf("%d\n", val);
ret = val;
}
break;
default:
usage();
return 0;