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

Method enablePowerStates

src/usb_control.cpp:269–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267}
268
269UsbControl::ResultCode UsbControl::enablePowerStates()
270{
271 UsbControl::ResultCode code;
272 int r;
273
274 r = libusb_ext::set_feature(handle_, timeout_, libusb_ext::U1_ENABLE);
275 CHECK_LIBUSB_RESULT(code, r) << "failed to enable power states U1! " << WRITE_LIBUSB_ERROR(r);
276
277 if(code == Success)
278 {
279 r = libusb_ext::set_feature(handle_, timeout_, libusb_ext::U2_ENABLE);
280 CHECK_LIBUSB_RESULT(code, r) << "failed to enable power states U2! " << WRITE_LIBUSB_ERROR(r);
281 }
282
283 return code;
284}
285
286UsbControl::ResultCode UsbControl::setVideoTransferFunctionState(UsbControl::State state)
287{

Callers 1

openMethod · 0.80

Calls 1

set_featureFunction · 0.85

Tested by

no test coverage detected