| 
      
      
      From: Peter F. <las...@gm...> - 2006-06-26 10:15:15
      
     | 
| Hello, i am new with this libUSB and from http://www.kdedevelopers.org/node/2029 i have the following code snippet, from a linux program, to call some special function inside the Logitech MX610 mouse: ================================== struct hiddev_usage_ref usage_ref; struct hiddev_report_info rep_info; unsigned char command[6]={0x01, 0x80, 0x52, 0x06, 0x00, 0x00 }; for (alv = 0; alv < 6; ++alv) { usage_ref.report_type = HID_REPORT_TYPE_OUTPUT; usage_ref.report_id = 0x10; usage_ref.field_index = 0; usage_ref.usage_code = 0xff000001; usage_ref.usage_index = alv; usage_ref.value = (unsigned char) command[alv]; int ret = ioctl(fd, HIDIOCSUSAGE, &usage_ref); if ( ret < 0 ) printf("Error (SUSAGE) while talking to the Mouse: %i\n", ret); usage_ref.usage_index++; } rep_info.report_type = HID_REPORT_TYPE_OUTPUT; rep_info.report_id = 0x10; rep_info.num_fields = 1; if (ioctl(fd, HIDIOCSREPORT, &rep_info) < 0) { printf("Error (SREPORT) while talking to the Mouse\n"); return -1; } ======================================= I am not sure how i can make this ioctl calls via some libUsb function, is this possible? How? regards Peter -- Newsreader: http://mesnews.net/index-gb.php Deutsche Hilfedatei: http://www.lastwebpage.de/download/mesnews-de.zip |