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 options for setting led status
Origin commit data
------------------
Branch: master
Commit: fded24562f
Author: martii <you@example.com>
Date: 2012-07-14 (Sat, 14 Jul 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -135,7 +135,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
#ifdef MARTII
|
||||
while ((c = getopt (argc, argv, "gs:tw:l:L:")) != -1)
|
||||
#else
|
||||
while ((c = getopt (argc, argv, "gs:tw:")) != -1)
|
||||
#endif
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
@@ -221,6 +225,18 @@ int main(int argc, char **argv)
|
||||
*/
|
||||
sleep(2); /* not reached... */
|
||||
break;
|
||||
#ifdef MARTII
|
||||
case 'l': /* LED on */
|
||||
aotom.u.led.on = LOG_ON;
|
||||
aotom.u.led.led_nr = atoi(optarg);
|
||||
ioctl(fd, VFDSETLED, &aotom);
|
||||
break;
|
||||
case 'L': /* LED off */
|
||||
aotom.u.led.on = LOG_OFF;
|
||||
aotom.u.led.led_nr = atoi(optarg);
|
||||
ioctl(fd, VFDSETLED, &aotom);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
usage();
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user