14 #define FW_UPDATE_INTERFACE_NUMBER 0 15 #define DEFAULT_TIMEOUT 100 26 LOG_ERROR(
"Unable to open USB device: " << usb->get_info().id);
52 LOG_ERROR(
"DFU is not on detach state! state is : " << state <<
", device ID is : " << usb->get_info().id);
59 auto sts = messenger->control_transfer(0xa1,
RS2_DFU_UPLOAD, 0, 0, reinterpret_cast<uint8_t*>(&payload),
sizeof(payload), transferred,
DEFAULT_TIMEOUT);
105 std::shared_ptr<context>
ctx,
106 const std::vector<platform::usb_device_info>& usb_devices,
int mask)
108 std::vector<std::shared_ptr<device_info>> list;
109 for (
auto&& usb : usb_devices)
113 list.push_back(std::make_shared<fw_update_info>(ctx, usb));
130 return std::make_shared<ds_update_device>(
ctx, register_device_notifications, usb);
132 return std::make_shared<sr300_update_device>(
ctx, register_device_notifications, usb);
134 return std::make_shared<l500_update_device>(
ctx, register_device_notifications, usb);
137 bool dev_is_l500 =
false;
141 return std::make_shared<l500_update_device>(
ctx, register_device_notifications, usb);
143 return std::make_shared<ds_update_device>(
ctx, register_device_notifications, usb);
148 throw std::runtime_error(
to_string() <<
"Failed to create FW update device, device id: " <<
_dfu.
id);
const uint16_t RS_RECOVERY_PID
const uint16_t SR300_RECOVERY
#define FW_UPDATE_INTERFACE_NUMBER
std::shared_ptr< device_interface > create(std::shared_ptr< context > ctx, bool register_device_notifications) const override
def info(name, value, persistent=False)
static const uint16_t DFU_VERSION_VALUE
bool is_l500_recovery(platform::rs_usb_device usb, bool &is_l500_device)
#define RS2_PRODUCT_LINE_D400
const uint16_t L535_RECOVERY_PID
const uint16_t RS_USB2_RECOVERY_PID
#define RS2_PRODUCT_LINE_L500
platform::usb_device_info _dfu
const uint16_t L500_USB2_RECOVERY_PID_OLD
static std::vector< std::shared_ptr< device_info > > pick_recovery_devices(std::shared_ptr< context > ctx, const std::vector< platform::usb_device_info > &usb_devices, int mask)
GLbitfield GLuint64 timeout
int get_product_line(const platform::usb_device_info &usb_info)
static const uint16_t DFU_VERSION_MASK
const uint16_t L500_RECOVERY_PID
#define RS2_PRODUCT_LINE_SR300
std::string to_string(T value)