summaryrefslogtreecommitdiff
path: root/libusb
diff options
context:
space:
mode:
authorMartin Ling <martin-git@earth.li>2022-10-11 15:49:22 +0100
committerTormod Volden <debian.tormod@gmail.com>2023-01-20 11:05:01 +0100
commitaac2e12e5f439d401029499b7cdd77c40ee8ed45 (patch)
treed13790f371e0dbb4ecd0bac6d14d13703d789ee0 /libusb
parent3c33e499a051562a4bafaeb38a79089351c94381 (diff)
downloadlibusb-aac2e12e5f439d401029499b7cdd77c40ee8ed45.tar.gz
windows: Add GetPipePolicy to struct winusb_interface
Diffstat (limited to 'libusb')
-rw-r--r--libusb/os/windows_winusb.c1
-rw-r--r--libusb/os/windows_winusb.h8
-rw-r--r--libusb/version_nano.h2
3 files changed, 10 insertions, 1 deletions
diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c
index 885b4e4..4100eaa 100644
--- a/libusb/os/windows_winusb.c
+++ b/libusb/os/windows_winusb.c
@@ -2344,6 +2344,7 @@ static bool winusbx_init(struct libusb_context *ctx)
WinUSB_Set(hWinUSB, ResetPipe, true);
WinUSB_Set(hWinUSB, SetCurrentAlternateSetting, true);
WinUSB_Set(hWinUSB, SetPipePolicy, true);
+ WinUSB_Set(hWinUSB, GetPipePolicy, true);
WinUSB_Set(hWinUSB, WritePipe, true);
// Check for isochronous transfers support (available starting with Windows 8.1)
diff --git a/libusb/os/windows_winusb.h b/libusb/os/windows_winusb.h
index 8c14cea..437a33f 100644
--- a/libusb/os/windows_winusb.h
+++ b/libusb/os/windows_winusb.h
@@ -531,6 +531,13 @@ typedef BOOL (WINAPI *WinUsb_SetPipePolicy_t)(
ULONG ValueLength,
PVOID Value
);
+typedef BOOL (WINAPI *WinUsb_GetPipePolicy_t)(
+ WINUSB_INTERFACE_HANDLE InterfaceHandle,
+ UCHAR PipeID,
+ ULONG PolicyType,
+ PULONG ValueLength,
+ PVOID Value
+);
typedef BOOL (WINAPI *WinUsb_UnregisterIsochBuffer_t)(
WINUSB_ISOCH_BUFFER_HANDLE BufferHandle
);
@@ -662,6 +669,7 @@ struct winusb_interface {
WinUsb_ResetPipe_t ResetPipe;
WinUsb_SetCurrentAlternateSetting_t SetCurrentAlternateSetting;
WinUsb_SetPipePolicy_t SetPipePolicy;
+ WinUsb_GetPipePolicy_t GetPipePolicy;
WinUsb_WritePipe_t WritePipe;
union {
struct {
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 9e7b749..ade020c 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11769
+#define LIBUSB_NANO 11770