doc: Improve comments related to device discovery and hotplug Closes #1013
diff --git a/libusb/core.c b/libusb/core.c index 90eb6d7..3d2f2b4 100644 --- a/libusb/core.c +++ b/libusb/core.c
@@ -580,7 +580,9 @@ * * The libusb_get_device_list() function can be used to obtain a list of * devices currently connected to the system. This is known as device - * discovery. + * discovery. Devices can also be discovered with the hotplug mechanism, + * whereby a callback function registered with libusb_hotplug_register_callback() + * will be called when a device of interest is connected or disconnected. * * Just because you have a reference to a device does not mean it is * necessarily usable. The device may have been unplugged, you may not have @@ -611,7 +613,7 @@ * * With the above information in mind, the process of opening a device can * be viewed as follows: - * -# Discover devices using libusb_get_device_list(). + * -# Discover devices using libusb_get_device_list() or libusb_hotplug_register_callback(). * -# Choose the device that you want to operate, and call libusb_open(). * -# Unref all devices in the discovered device list. * -# Free the discovered device list.
diff --git a/libusb/hotplug.c b/libusb/hotplug.c index 4bb2d4e..402e693 100644 --- a/libusb/hotplug.c +++ b/libusb/hotplug.c
@@ -62,7 +62,7 @@ * A hotplug event can listen for either or both of these events. * * Note: If you receive notification that a device has left and you have any - * a libusb_device_handles for the device it is up to you to call libusb_close() + * libusb_device_handles for the device it is up to you to call libusb_close() * on each device handle to free up any remaining resources associated with the device. * Once a device has left any libusb_device_handle associated with the device * are invalid and will remain so even if the device comes back.
diff --git a/libusb/libusb.h b/libusb/libusb.h index 0b3d854..2825b41 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h
@@ -992,7 +992,7 @@ /** \ingroup libusb_dev * Structure representing a USB device detected on the system. This is an * opaque type for which you are only ever provided with a pointer, usually - * originating from libusb_get_device_list(). + * originating from libusb_get_device_list() or libusb_hotplug_register_callback(). * * Certain operations can be performed on a device, but in order to do any * I/O you will have to first obtain a device handle using libusb_open().
diff --git a/libusb/version_nano.h b/libusb/version_nano.h index a0cf63c..7bbbe39 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h
@@ -1 +1 @@ -#define LIBUSB_NANO 11661 +#define LIBUSB_NANO 11662