MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / set_feature

Function set_feature

src/usb_control.cpp:100–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98
99 template<typename TFeatureSelector>
100 int set_feature(libusb_device_handle *handle, int timeout, TFeatureSelector feature_selector)
101 {
102 // for details see USB 3.1 r1 spec section 9.4.9
103
104 uint8_t bmRequestType = FeatureSelectorRecipient<TFeatureSelector>::get();
105 uint8_t bRequest = LIBUSB_REQUEST_SET_FEATURE;
106 uint16_t wValue = static_cast<uint16_t>(feature_selector);
107 uint16_t wIndex = 0;
108 uint16_t wLength = 0;
109 uint8_t *data = 0;
110
111 return libusb_control_transfer(handle, bmRequestType, bRequest, wValue, wIndex, data, wLength, timeout);
112 }
113
114 int set_feature_function_suspend(libusb_device_handle *handle, int timeout, bool low_power_suspend, bool function_remote_wake)
115 {

Callers 1

enablePowerStatesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected