mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 15:02:43 +02:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user