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

Method claimInterfaces

src/usb_control.cpp:217–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217UsbControl::ResultCode UsbControl::claimInterfaces()
218{
219 UsbControl::ResultCode code = Success;
220 int r;
221
222 r = libusb_claim_interface(handle_, ControlAndRgbInterfaceId);
223 CHECK_LIBUSB_RESULT(code, r) << "failed to claim interface with ControlAndRgbInterfaceId(="<< ControlAndRgbInterfaceId << ")! " << WRITE_LIBUSB_ERROR(r);
224
225 if(code == Success)
226 {
227 r = libusb_claim_interface(handle_, IrInterfaceId);
228 CHECK_LIBUSB_RESULT(code, r) << "failed to claim interface with IrInterfaceId(="<< IrInterfaceId << ")! " << WRITE_LIBUSB_ERROR(r);
229 }
230
231 return code;
232}
233
234UsbControl::ResultCode UsbControl::releaseInterfaces()
235{

Callers 1

openMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected