libusb-rs
libusb-rs copied to clipboard
hotplug callback
hi. thanks for making this library wrapper. one thing i would love to use but don't see implemented is the hotplug functionality. from the docs:
int libusb_hotplug_register_callback | ( | libusb_context * | ctx,
-- | -- | -- | --
| | libusb_hotplug_event | events,
| | libusb_hotplug_flag | flags,
| | int | vendor_id,
| | int | product_id,
| | int | dev_class,
| | libusb_hotplug_callback_fn | cb_fn,
| | void * | user_data,
| | libusb_hotplug_callback_handle * | handle
| )
is this already available and i'm missing something?
Taking a look about two years later: it looks like this isn't currently supported.
I could take a stab at implementing it, if nobody else is currently trying.
Looks like rusb, which is the actively maintained fork of this crate, already has hotplug support: https://docs.rs/rusb/0.6.5/rusb/trait.UsbContext.html#method.register_callback