libvcomm  1.0
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
vinfo.c
/*
* vinfo.c
*
* Find and list IRvoodoo devices
* Created on: 17.09.2012
* Author: Tarmo Kople <tarmo@flycom.ee>
*/
#include <stdio.h>
#include <stdlib.h>
#include <vcomm.h>
int main(int argc, char **argv) {
struct hid_device_info *devs;
devs=Vlist();
puts("Devices found:");
if(!devs){
puts("None.");
return EXIT_SUCCESS;
}
while(devs){
printf("Device: %S ", devs->serial_number);
printf("Interface: %d ", devs->interface_number);
printf("Device path: %s Type:", devs->path);
switch (devs->interface_number) {
case 0:
puts(" Keyboard");
break;
case 1:
puts(" Consumer device");
break;
case 2:
puts(" Mouse");
break;
case 3:
puts(" Configuration interface");
printf("\n");
break;
default:
break;
}
devs=devs->next;
}
return EXIT_SUCCESS;
}