diff options
author | Pete Batard <pbatard@gmail.com> | 2010-01-14 01:26:01 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-01-14 01:26:01 +0000 |
commit | 191930f7007f373144ee7ecfc098eb390a33265d (patch) | |
tree | c24f780f70f0cd0c7add5d967b0406e7c4101ee2 /libusb/os/windows_usb.h | |
parent | 0cf1a367fabb80de559b7bb3e99ee541e59510ae (diff) | |
download | libusb-191930f7007f373144ee7ecfc098eb390a33265d.tar.gz |
svn r42:
- code cleanup
- device reset improvement (tentative)
- inquiry request for Mass Storage in xusb.c
Diffstat (limited to 'libusb/os/windows_usb.h')
-rw-r--r-- | libusb/os/windows_usb.h | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/libusb/os/windows_usb.h b/libusb/os/windows_usb.h index 9534620..3ecdd68 100644 --- a/libusb/os/windows_usb.h +++ b/libusb/os/windows_usb.h @@ -31,7 +31,6 @@ #define false FALSE #endif -// Make sure you keep these in check with what libusb uses for its device declaration #if !defined(libusb_bus_t) #define libusb_bus_t uint8_t #define LIBUSB_BUS_MAX UINT8_MAX @@ -41,7 +40,6 @@ #define LIBUSB_DEVADDR_MAX UINT8_MAX #endif -// Better safe than sorry... #define safe_free(p) do {if (p != NULL) {free(p); p = NULL;}} while(0) #define safe_closehandle(h) do {if (h != INVALID_HANDLE_VALUE) {CloseHandle(h); h = INVALID_HANDLE_VALUE;}} while(0) #define safe_strncpy(dst, dst_max, src, count) strncpy(dst, src, min(count, dst_max - 1)) @@ -71,7 +69,7 @@ void inline upperize(char* str) { #define wchar_to_utf8_ms(wstr, str, strlen) WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, strlen, NULL, NULL) #define ERRNO GetLastError() -// API (driver access) types +// Supported APIs enum api_type { API_NONE, API_WINUSB, @@ -91,7 +89,6 @@ enum api_type { enum windows_version { WINDOWS_UNSUPPORTED, - WINDOWS_2000, WINDOWS_XP, WINDOWS_VISTA_AND_LATER, }; @@ -223,34 +220,6 @@ typedef struct _USB_CONFIGURATION_DESCRIPTOR_SHORT { } USB_CONFIGURATION_DESCRIPTOR_SHORT; #pragma pack() - -/* - * Some of the EX stuff is not yet in MinGW => define it - */ -#ifndef USB_GET_NODE_CONNECTION_INFORMATION_EX -#define USB_GET_NODE_CONNECTION_INFORMATION_EX 274 -#endif - -#ifndef IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX -#define IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX \ - CTL_CODE(FILE_DEVICE_USB, USB_GET_NODE_CONNECTION_INFORMATION_EX, \ - METHOD_BUFFERED, FILE_ANY_ACCESS) -#endif - -#ifndef USB_NODE_CONNECTION_INFORMATION_EX -typedef struct _USB_NODE_CONNECTION_INFORMATION_EX { - ULONG ConnectionIndex; - USB_DEVICE_DESCRIPTOR DeviceDescriptor; - UCHAR CurrentConfigurationValue; - UCHAR Speed; - BOOLEAN DeviceIsHub; - USHORT DeviceAddress; - ULONG NumberOfOpenPipes; - USB_CONNECTION_STATUS ConnectionStatus; - USB_PIPE_INFO PipeList[0]; -} USB_NODE_CONNECTION_INFORMATION_EX, *PUSB_NODE_CONNECTION_INFORMATION_EX; -#endif - #ifndef USB_HUB_CAP_FLAGS typedef union _USB_HUB_CAP_FLAGS { ULONG ul; |