mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-26 15:50:34 +08:00
Added LED_TOGGLE for normal LEDs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user