22 int vid = LIBUSB_HOTPLUG_MATCH_ANY;
23 int pid = LIBUSB_HOTPLUG_MATCH_ANY;
28 return other.vid == this->vid && other.pid == this->pid &&
37 constexpr auto cmp = [] (
int const lhs,
int const rhs) ->
bool
39 return (lhs == rhs) || lhs == LIBUSB_HOTPLUG_MATCH_ANY ||
40 rhs == LIBUSB_HOTPLUG_MATCH_ANY;
49 .
vid = desc.idVendor, .pid = desc.idProduct, .dev_class = desc.bDeviceClass};
Definition flag_type.hpp:6
auto triplet_from_descriptor(libusb_device_descriptor const &desc)
Definition device_triplet.hpp:46
An aggregate struct to pass to functions requiring device information.
Definition device_triplet.hpp:21
int pid
Definition device_triplet.hpp:23
constexpr bool operator==(device_triplet const &other) const noexcept
Definition device_triplet.hpp:26
int dev_class
Definition device_triplet.hpp:24
int vid
Definition device_triplet.hpp:22
Definition device_triplet.hpp:34
constexpr bool operator()(const device_triplet &lhs, const device_triplet &rhs) const
Definition device_triplet.hpp:35