mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
spark_fp: add option to find out the frontpanel type
this needs my latest patched aotom driver again...
This commit is contained in:
@@ -38,6 +38,7 @@ void usage()
|
|||||||
{
|
{
|
||||||
printf("usage spark_fp <option>\n");
|
printf("usage spark_fp <option>\n");
|
||||||
printf("\t-g: get wakeup reason (return code == reason)\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-t: get current FP time\n");
|
||||||
printf("\t-s <time>: set FP time (time = 0: use current 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");
|
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;
|
ret = 0;
|
||||||
while ((c = getopt (argc, argv, "gs:tw:")) != -1)
|
while ((c = getopt (argc, argv, "gs:tw:T")) != -1)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
@@ -219,6 +220,16 @@ int main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
sleep(2); /* not reached... */
|
sleep(2); /* not reached... */
|
||||||
break;
|
break;
|
||||||
|
case 'T':
|
||||||
|
ret = ioctl(fd, VFDGETVERSION, &val);
|
||||||
|
if (ret < 0)
|
||||||
|
perror("ioctl VFDGETVERSION");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("%d\n", val);
|
||||||
|
ret = val;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user