}
break;
+ case EVENT_REGISTER:
+ fprintf(stderr,"EVENT_REGISTER\n");
+ {
+ struct event *e = (struct event*)(wdheader->data);
+ int i;
+
+ fprintf(stderr,"handle: %lu, action: %lu, status: %lu, eventid: %lu, cardtype: %lu, kplug: %lu, options: %lu, dev: %lx:%lx, unique: %lu, ver: %lu, nummatch: %lu\n", e->handle, e->dwAction, e->dwStatus, e->dwEventId, e->dwCardType, e->hKernelPlugIn, e->dwOptions, e->u.Usb.deviceId.dwVendorId, e->u.Usb.deviceId.dwProductId, e->u.Usb.dwUniqueID, e->dwEventVer, e->dwNumMatchTables);
+ for (i = 0; i < e->dwNumMatchTables; i++)
+ fprintf(stderr,"match: dev: %x:%x, class: %x, subclass: %x, intclass: %x, intsubclass: %x, intproto: %x\n", e->matchTables[i].VendorId, e->matchTables[i].ProductId, e->matchTables[i].bDeviceClass, e->matchTables[i].bDeviceSubClass, e->matchTables[i].bInterfaceClass, e->matchTables[i].bInterfaceSubClass, e->matchTables[i].bInterfaceProtocol);
+
+ ret = (*ioctl_func) (fd, request, wdioctl);
+
+ fprintf(stderr,"handle: %lu, action: %lu, status: %lu, eventid: %lu, cardtype: %lu, kplug: %lu, options: %lu, dev: %lx:%lx, unique: %lu, ver: %lu, nummatch: %lu\n", e->handle, e->dwAction, e->dwStatus, e->dwEventId, e->dwCardType, e->hKernelPlugIn, e->dwOptions, e->u.Usb.deviceId.dwVendorId, e->u.Usb.deviceId.dwProductId, e->u.Usb.dwUniqueID, e->dwEventVer, e->dwNumMatchTables);
+ for (i = 0; i < e->dwNumMatchTables; i++)
+ fprintf(stderr,"match: dev: %x:%x, class: %x, subclass: %x, intclass: %x, intsubclass: %x, intproto: %x\n", e->matchTables[i].VendorId, e->matchTables[i].ProductId, e->matchTables[i].bDeviceClass, e->matchTables[i].bDeviceSubClass, e->matchTables[i].bInterfaceClass, e->matchTables[i].bInterfaceSubClass, e->matchTables[i].bInterfaceProtocol);
+ }
+ break;
+
case TRANSFER:
fprintf(stderr,"TRANSFER\n");
ret = (*ioctl_func) (fd, request, wdioctl);
case INT_WAIT:
fprintf(stderr,"INT_WAIT\n");
- ret = (*ioctl_func) (fd, request, wdioctl);
+ {
+ struct interrupt *it = (struct interrupt*)(wdheader->data);
+
+ fprintf(stderr," Handle: %lu, Options: %lx, ncmds: %lu\n", it->hInterrupt, it->dwOptions, it->dwCmds);
+
+ hexdump(wdheader->data, wdheader->size);
+ ret = (*ioctl_func) (fd, request, wdioctl);
+ //ret = 0;
+ //it->dwCounter++;
+ fprintf(stderr,"\n\n");
+ hexdump(wdheader->data, wdheader->size);
+ fprintf(stderr,"\n");
+ }
break;
case CARD_UNREGISTER:
ret = (*ioctl_func) (fd, request, wdioctl);
break;
- case EVENT_REGISTER:
- fprintf(stderr,"EVENT_REGISTER\n");
- ret = (*ioctl_func) (fd, request, wdioctl);
- break;
-
default:
ret = (*ioctl_func) (fd, request, wdioctl);
}