| 215 | } |
| 216 | |
| 217 | UsbControl::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 | |
| 234 | UsbControl::ResultCode UsbControl::releaseInterfaces() |
| 235 | { |