-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
libusbk_libusb0Windows libusbk backend for libusbk.sys and libusb0.sysWindows libusbk backend for libusbk.sys and libusb0.syswindows
Description
And does this mean that, even if a given device is "officially" using libusb0 (i.e. libusb0.sys, libusb0.dll reported by Device Manager), then in the end all functions of winusb_interface are backed by libusbK implementation and none of libusb0 code will be called?
I am having this understanding based on this code snippet from windows_winsub.c, funciton winusbx_init, line 2505:
// NB: The below for loop works because the sub_api value for WinUSB
// is a higher value than that of libusbK and libusb0
for (; sub_api < SUB_API_WINUSB; sub_api++) {
libusbK_Set(sub_api, AbortPipe, true);
libusbK_Set(sub_api, ControlTransfer, true);
libusbK_Set(sub_api, FlushPipe, true);
libusbK_Set(sub_api, Free, true);
libusbK_Set(sub_api, GetAssociatedInterface, true);
libusbK_Set(sub_api, Initialize, true);
libusbK_Set(sub_api, ReadPipe, true);
libusbK_Set(sub_api, ResetPipe, true);
libusbK_Set(sub_api, SetCurrentAlternateSetting, true);
libusbK_Set(sub_api, SetPipePolicy, true);
libusbK_Set(sub_api, WritePipe, true);
//etc.
sub_api takes value from 0 to 1, i.e. SUB_API_LIBUBSK and SUB_API_LIBUSB0, meanig that function pointers corresponding to libusb0 are actually pointing to libusbK.
Thank you in advance for your help understanding this.
Best regards.
Metadata
Metadata
Assignees
Labels
libusbk_libusb0Windows libusbk backend for libusbk.sys and libusb0.sysWindows libusbk backend for libusbk.sys and libusb0.syswindows