Added LED_TOGGLE for normal LEDs

This commit is contained in:
Julian Oes
2013-08-15 17:34:49 +02:00
parent f51320d1af
commit 0c4e3dce0e
4 changed files with 38 additions and 0 deletions
+6
View File
@@ -52,6 +52,7 @@ __BEGIN_DECLS
extern void led_init();
extern void led_on(int led);
extern void led_off(int led);
extern void led_toggle(int led);
__END_DECLS
class LED : device::CDev
@@ -98,6 +99,11 @@ LED::ioctl(struct file *filp, int cmd, unsigned long arg)
led_off(arg);
break;
case LED_TOGGLE:
led_toggle(arg);
break;
default:
result = CDev::ioctl(filp, cmd, arg);
}