Code: Select all
0000 0000 0000 0000 1100 0800 0100 0000
Code: Select all
0000 0000 0000 0000 1100 0800 0000 0000
Could someone help or explain me how to switch on/off the LED by sending strings to the HID-Device (for example /dev/input/event3)
Moderator: Moderators
Code: Select all
0000 0000 0000 0000 1100 0800 0100 0000
Code: Select all
0000 0000 0000 0000 1100 0800 0000 0000
Code: Select all
struct input_event ev;
fd = open ("/dev/input/event3", O_WRONLY);
ev.code = EV_LED; // = 0x11
ev.code = LED_MISC; // = 0x08
ev.value = 1;// 1=an, 0=aus
write(fd, &ev, sizeof(struct input_event));
close(fd);