Hi,
I connected usb keyboard to davinci evm board.
i inserted musb_hdrc.ko module & human interafce module.
The keyboard is working perfectly. i can read keycodes & events.

But the problem came is when i try to glow the keyboard leds.

using EVIOCGBIT ioctl, i got the supported leds for my keyboard,

Supported LEDs:
 LED type 0x00  (Num Lock)
 LED type 0x01  (Caps Lock)
 LED type 0x02  (Scroll Lock)

when i wrote a sample application to glow my capslock led,

            struct input_event ev;

             ev.type = EV_LED;
             ev.code = LED_CAPSL;
              ev.value = 1;
               fd=open(/dev/input/event0, O_RDWR | O_EXCL);

                if(fd>0)
                         {
                                   retval = ioctl(fd,
EVIOCGNAME(sizeof(devname)), devname);
                                      retvol = write(fd, &ev,sizeof(struct
input_event));
                                        printf("Name : %s, Error : %s,
%s\n",devname, strerror(retval),

strerror(retvol));
                                          sleep(1);
                                           }
                 else
                      printf("open failed \n");

                close(fd);


When i run this program, i got this error,
                    Name : HID 1267:0103, Error : Bad address, Device or
resource busy
where, this id's belong to my keyboard only.
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to