format_get_field
uint8_t format_get_field(const char *, const char *, const uint8_t *, uint16_t);
if (format_get_field(type, "mfl_vendor", ptr, size))
if (format_get_field(type, "mfl_product", ptr, size))
if (format_get_field(type, "mfl_dev_lo", ptr, size))
if (format_get_field(type, "mfl_dev_hi", ptr, size))
if (format_get_field(type, "mfl_dev_class", ptr, size))
if (format_get_field(type, "mfl_dev_subclass", ptr, size))
if (format_get_field(type, "mfl_dev_protocol", ptr, size))
if (format_get_field(type, "mfl_int_class", ptr, size))
if (format_get_field(type, "mfl_int_subclass", ptr, size))
if (format_get_field(type, "mfl_int_protocol", ptr, size))
id->idVendor = format_get_field(type, "idVendor[0]", ptr, size) |
(format_get_field(type, "idVendor[1]", ptr, size) << 8);
id->idProduct = format_get_field(type, "idProduct[0]", ptr, size) |
(format_get_field(type, "idProduct[1]", ptr, size) << 8);
id->bcdDevice_lo = format_get_field(type, "bcdDevice_lo[0]", ptr, size) |
(format_get_field(type, "bcdDevice_lo[1]", ptr, size) << 8);
id->bcdDevice_hi = format_get_field(type, "bcdDevice_hi[0]", ptr, size) |
(format_get_field(type, "bcdDevice_hi[1]", ptr, size) << 8);
id->bDeviceClass = format_get_field(type, "bDeviceClass", ptr, size);
id->bDeviceSubClass = format_get_field(type, "bDeviceSubClass", ptr, size);
id->bDeviceProtocol = format_get_field(type, "bDeviceProtocol", ptr, size);
id->bInterfaceClass = format_get_field(type, "bInterfaceClass", ptr, size);
id->bInterfaceSubClass = format_get_field(type, "bInterfaceSubClass", ptr, size);
id->bInterfaceProtocol = format_get_field(type, "bInterfaceProtocol", ptr, size);
if (format_get_field(type, "mf_vendor", ptr, size))
if (format_get_field(type, "mf_product", ptr, size))
if (format_get_field(type, "mf_dev_lo", ptr, size))
if (format_get_field(type, "mf_dev_hi", ptr, size))
if (format_get_field(type, "mf_dev_class", ptr, size))
if (format_get_field(type, "mf_dev_subclass", ptr, size))
if (format_get_field(type, "mf_dev_protocol", ptr, size))
if (format_get_field(type, "mf_int_class", ptr, size))
if (format_get_field(type, "mf_int_subclass", ptr, size))
if (format_get_field(type, "mf_int_protocol", ptr, size))