mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
add VFDGETVERSION support
Origin commit data
------------------
Branch: master
Commit: 462353e9dd
Author: martii <you@example.com>
Date: 2012-09-12 (Wed, 12 Sep 2012)
------------------
No further description and justification available within origin commit message!
------------------
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");
|
||||
@@ -140,9 +141,9 @@ int main(int argc, char **argv)
|
||||
|
||||
ret = 0;
|
||||
#ifdef MARTII
|
||||
while ((c = getopt (argc, argv, "gs:tw:l:L:")) != -1)
|
||||
while ((c = getopt (argc, argv, "gs:tw:Tl:L:")) != -1)
|
||||
#else
|
||||
while ((c = getopt (argc, argv, "gs:tw:")) != -1)
|
||||
while ((c = getopt (argc, argv, "gs:tw:T")) != -1)
|
||||
#endif
|
||||
{
|
||||
switch (c)
|
||||
@@ -241,6 +242,16 @@ int main(int argc, char **argv)
|
||||
ioctl(fd, VFDSETLED, &aotom);
|
||||
break;
|
||||
#endif
|
||||
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