mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
tools/spark_fp: add option for enabling/disabling icons
This commit is contained in:
@@ -44,6 +44,8 @@ void usage()
|
|||||||
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");
|
||||||
printf("\t-l <n>: set LED <n> on\n");
|
printf("\t-l <n>: set LED <n> on\n");
|
||||||
printf("\t-L <n>: set LED <n> off\n");
|
printf("\t-L <n>: set LED <n> off\n");
|
||||||
|
printf("\t-i <n>: set icon <n> on\n");
|
||||||
|
printf("\t-I <n>: set icon <n> off\n");
|
||||||
printf("times are given in unix time (UTC, seconds since 1970-01-01 00:00:00)\n");
|
printf("times are given in unix time (UTC, seconds since 1970-01-01 00:00:00)\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@@ -138,7 +140,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
while ((c = getopt (argc, argv, "gs:tw:Tl:L:")) != -1)
|
while ((c = getopt (argc, argv, "gs:tw:Tl:L:i:I:")) != -1)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
@@ -232,6 +234,16 @@ int main(int argc, char **argv)
|
|||||||
aotom.u.led.led_nr = atoi(optarg);
|
aotom.u.led.led_nr = atoi(optarg);
|
||||||
ioctl(fd, VFDSETLED, &aotom);
|
ioctl(fd, VFDSETLED, &aotom);
|
||||||
break;
|
break;
|
||||||
|
case 'i': /* icon on */
|
||||||
|
aotom.u.icon.on = 1;
|
||||||
|
aotom.u.icon.icon_nr = atoi(optarg);
|
||||||
|
ioctl(fd, VFDICONDISPLAYONOFF, &aotom);
|
||||||
|
break;
|
||||||
|
case 'I': /* icon off */
|
||||||
|
aotom.u.icon.on = 0;
|
||||||
|
aotom.u.icon.icon_nr = atoi(optarg);
|
||||||
|
ioctl(fd, VFDICONDISPLAYONOFF, &aotom);
|
||||||
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
ret = ioctl(fd, VFDGETVERSION, &val);
|
ret = ioctl(fd, VFDGETVERSION, &val);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Reference in New Issue
Block a user