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:
martii
2012-07-14 13:12:50 +02:00
parent 341a2bf9aa
commit dbcda3b688

View File

@@ -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;