Author: tfaber
Date: Sun Jun 11 12:26:48 2017
New Revision: 75002
URL:
http://svn.reactos.org/svn/reactos?rev=75002&view=rev
Log:
[PSDK]
- Fix C++ version of BM_REQUEST_TYPE without breaking the C version
Modified:
trunk/reactos/sdk/include/psdk/usb200.h
trunk/reactos/sdk/lib/drivers/libusb/hub_controller.cpp
trunk/reactos/sdk/lib/drivers/libusb/usb_device.cpp
Modified: trunk/reactos/sdk/include/psdk/usb200.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/usb200.h?…
==============================================================================
--- trunk/reactos/sdk/include/psdk/usb200.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/psdk/usb200.h [iso-8859-1] Sun Jun 11 12:26:48 2017
@@ -55,12 +55,16 @@
typedef union _BM_REQUEST_TYPE {
+#ifdef __cplusplus
+ struct {
+#else
struct _BM {
+#endif
UCHAR Recipient:2;
UCHAR Reserved:3;
UCHAR Type:2;
UCHAR Dir:1;
- } _BM;
+ };
UCHAR B;
} BM_REQUEST_TYPE, *PBM_REQUEST_TYPE;
Modified: trunk/reactos/sdk/lib/drivers/libusb/hub_controller.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/libusb/hub…
==============================================================================
--- trunk/reactos/sdk/lib/drivers/libusb/hub_controller.cpp [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/drivers/libusb/hub_controller.cpp [iso-8859-1] Sun Jun 11
12:26:48 2017
@@ -1426,8 +1426,8 @@
// generate setup packet
//
CtrlSetup.bmRequestType.B = 0;
- CtrlSetup.bmRequestType._BM.Recipient = BMREQUEST_TO_DEVICE;
- CtrlSetup.bmRequestType._BM.Type = BMREQUEST_CLASS;
+ CtrlSetup.bmRequestType.Recipient = BMREQUEST_TO_DEVICE;
+ CtrlSetup.bmRequestType.Type = BMREQUEST_CLASS;
CtrlSetup.bRequest = Urb->UrbControlVendorClassRequest.Request;
CtrlSetup.wValue.W = Urb->UrbControlVendorClassRequest.Value;
CtrlSetup.wIndex.W = Urb->UrbControlVendorClassRequest.Index;
@@ -1438,7 +1438,7 @@
//
// data direction is device to host
//
- CtrlSetup.bmRequestType._BM.Dir = BMREQUEST_DEVICE_TO_HOST;
+ CtrlSetup.bmRequestType.Dir = BMREQUEST_DEVICE_TO_HOST;
}
//
@@ -1889,8 +1889,8 @@
// initialize setup packet
//
CtrlSetup.bmRequestType.B = 0;
- CtrlSetup.bmRequestType._BM.Recipient = BMREQUEST_TO_DEVICE;
- CtrlSetup.bmRequestType._BM.Type = BMREQUEST_VENDOR;
+ CtrlSetup.bmRequestType.Recipient = BMREQUEST_TO_DEVICE;
+ CtrlSetup.bmRequestType.Type = BMREQUEST_VENDOR;
CtrlSetup.bRequest = Urb->UrbControlVendorClassRequest.Request;
CtrlSetup.wValue.W = Urb->UrbControlVendorClassRequest.Value;
CtrlSetup.wIndex.W = Urb->UrbControlVendorClassRequest.Index;
@@ -1901,7 +1901,7 @@
//
// data direction is device to host
//
- CtrlSetup.bmRequestType._BM.Dir = BMREQUEST_DEVICE_TO_HOST;
+ CtrlSetup.bmRequestType.Dir = BMREQUEST_DEVICE_TO_HOST;
}
//
Modified: trunk/reactos/sdk/lib/drivers/libusb/usb_device.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/libusb/usb…
==============================================================================
--- trunk/reactos/sdk/lib/drivers/libusb/usb_device.cpp [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/drivers/libusb/usb_device.cpp [iso-8859-1] Sun Jun 11 12:26:48
2017
@@ -698,10 +698,10 @@
//
// build setup packet
//
- CtrlSetup.bmRequestType._BM.Recipient = BMREQUEST_TO_DEVICE;
- CtrlSetup.bmRequestType._BM.Type = BMREQUEST_STANDARD;
- CtrlSetup.bmRequestType._BM.Reserved = 0;
- CtrlSetup.bmRequestType._BM.Dir = BMREQUEST_DEVICE_TO_HOST;
+ CtrlSetup.bmRequestType.Recipient = BMREQUEST_TO_DEVICE;
+ CtrlSetup.bmRequestType.Type = BMREQUEST_STANDARD;
+ CtrlSetup.bmRequestType.Reserved = 0;
+ CtrlSetup.bmRequestType.Dir = BMREQUEST_DEVICE_TO_HOST;
CtrlSetup.bRequest = USB_REQUEST_GET_DESCRIPTOR;
CtrlSetup.wValue.LowByte = ConfigurationIndex;
CtrlSetup.wValue.HiByte = USB_CONFIGURATION_DESCRIPTOR_TYPE;