コード例 #1
0
ファイル: uvc.cpp プロジェクト: DapengChalmers/ZSLAM_TX2
int UvcVideo::IoCtrl(uint8_t unit, uint8_t ctrl, unsigned char* data, int len, UvcRequestCode req_code)
{
    if(req_code == UVC_SET_CUR) {
        return uvc_set_ctrl(devh_, unit, ctrl, data, len);
    }else{
        return uvc_get_ctrl(devh_, unit, ctrl, data, len, (uvc_req_code)req_code);
    }
}
コード例 #2
0
ファイル: uvc-libuvc.cpp プロジェクト: Aevena/librealsense
 void set_control(device & device, const extension_unit & xu, uint8_t ctrl, void * data, int len)
 {
     int status = uvc_set_ctrl(device.get_subdevice(xu.subdevice).handle, xu.unit, ctrl, data, len);
     if(status < 0) throw std::runtime_error(to_string() << "uvc_set_ctrl(...) returned " << libusb_error_name(status));
 }